@itentialopensource/adapter-amazon_route53 0.2.2 → 0.3.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 (46) hide show
  1. package/AUTH.md +25 -22
  2. package/CALLS.md +59 -22
  3. package/CHANGELOG.md +8 -0
  4. package/CONTRIBUTING.md +1 -160
  5. package/ENHANCE.md +2 -2
  6. package/README.md +32 -23
  7. package/SYSTEMINFO.md +15 -5
  8. package/adapter.js +600 -1783
  9. package/adapterBase.js +549 -879
  10. package/changelogs/changelog.md +54 -0
  11. package/entities/.system/action.json +2 -2
  12. package/entities/Rest/action.json +109 -109
  13. package/metadata.json +70 -0
  14. package/package.json +24 -28
  15. package/pronghorn.json +981 -642
  16. package/propertiesSchema.json +439 -39
  17. package/refs?service=git-upload-pack +0 -0
  18. package/report/adapter-openapi.json +15721 -0
  19. package/report/adapter-openapi.yaml +11633 -0
  20. package/report/adapterInfo.json +8 -8
  21. package/report/updateReport1691507399893.json +120 -0
  22. package/report/updateReport1692202434448.json +120 -0
  23. package/report/updateReport1694460669097.json +120 -0
  24. package/report/updateReport1698420502742.json +120 -0
  25. package/sampleProperties.json +68 -5
  26. package/test/integration/adapterTestBasicGet.js +2 -4
  27. package/test/integration/adapterTestConnectivity.js +91 -42
  28. package/test/integration/adapterTestIntegration.js +130 -2
  29. package/test/unit/adapterBaseTestUnit.js +388 -313
  30. package/test/unit/adapterTestUnit.js +338 -112
  31. package/utils/adapterInfo.js +1 -1
  32. package/utils/addAuth.js +1 -1
  33. package/utils/artifactize.js +1 -1
  34. package/utils/checkMigrate.js +1 -1
  35. package/utils/entitiesToDB.js +2 -2
  36. package/utils/findPath.js +1 -1
  37. package/utils/methodDocumentor.js +273 -0
  38. package/utils/modify.js +13 -15
  39. package/utils/packModificationScript.js +1 -1
  40. package/utils/pre-commit.sh +2 -0
  41. package/utils/taskMover.js +309 -0
  42. package/utils/tbScript.js +89 -34
  43. package/utils/tbUtils.js +41 -21
  44. package/utils/testRunner.js +1 -1
  45. package/utils/troubleshootingAdapter.js +9 -6
  46. package/workflows/README.md +0 -3
package/adapter.js CHANGED
@@ -2,17 +2,23 @@
2
2
 
3
3
  /* eslint import/no-dynamic-require: warn */
4
4
  /* eslint object-curly-newline: warn */
5
+ /* eslint default-param-last: warn */
5
6
 
6
7
  // Set globals
7
8
  /* global log */
8
9
 
9
10
  /* Required libraries. */
10
11
  const path = require('path');
11
- const aws4 = require('aws4');
12
- const AWS = require('aws-sdk');
13
- const requestCall = require('request');
14
12
  const querystring = require('querystring');
15
13
 
14
+ const callOptions = {
15
+ service: 'route53',
16
+ datatype: {
17
+ request: 'XML',
18
+ response: 'XML2JSON'
19
+ }
20
+ };
21
+
16
22
  /* Fetch in the other needed components for the this Adaptor */
17
23
  const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
18
24
 
@@ -90,9 +96,6 @@ class AmazonRoute53 extends AdapterBaseCl {
90
96
  let myIgnore = [
91
97
  'healthCheck',
92
98
  'iapGetAdapterWorkflowFunctions',
93
- 'iapHasAdapterEntity',
94
- 'iapVerifyAdapterCapability',
95
- 'iapUpdateAdapterEntityCache',
96
99
  'hasEntities',
97
100
  'getAuthorization',
98
101
  'getAuthorizationAndIdentifyRequest'
@@ -121,29 +124,15 @@ class AmazonRoute53 extends AdapterBaseCl {
121
124
  * @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
122
125
  * @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
123
126
  * @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
127
+ * @param {boolean} replace - true to replace entire mock data, false to merge/append
124
128
  * @param {Callback} callback - The results of the call
125
129
  */
126
- iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
130
+ iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, replace, callback) {
127
131
  const meth = 'adapter-iapUpdateAdapterConfiguration';
128
132
  const origin = `${this.id}-${meth}`;
129
133
  log.trace(origin);
130
134
 
131
- super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback);
132
- }
133
-
134
- /**
135
- * See if the API path provided is found in this adapter
136
- *
137
- * @function iapFindAdapterPath
138
- * @param {string} apiPath - the api path to check on
139
- * @param {Callback} callback - The results of the call
140
- */
141
- iapFindAdapterPath(apiPath, callback) {
142
- const meth = 'adapter-iapFindAdapterPath';
143
- const origin = `${this.id}-${meth}`;
144
- log.trace(origin);
145
-
146
- super.iapFindAdapterPath(apiPath, callback);
135
+ super.iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, replace, callback);
147
136
  }
148
137
 
149
138
  /**
@@ -185,7 +174,7 @@ class AmazonRoute53 extends AdapterBaseCl {
185
174
  }
186
175
 
187
176
  /**
188
- * @summary Get the Adaoter Queue
177
+ * @summary Get the Adapter Queue
189
178
  *
190
179
  * @function iapGetAdapterQueue
191
180
  * @param {Callback} callback - callback function
@@ -198,6 +187,22 @@ class AmazonRoute53 extends AdapterBaseCl {
198
187
  return super.iapGetAdapterQueue(callback);
199
188
  }
200
189
 
190
+ /* SCRIPT CALLS */
191
+ /**
192
+ * See if the API path provided is found in this adapter
193
+ *
194
+ * @function iapFindAdapterPath
195
+ * @param {string} apiPath - the api path to check on
196
+ * @param {Callback} callback - The results of the call
197
+ */
198
+ iapFindAdapterPath(apiPath, callback) {
199
+ const meth = 'adapter-iapFindAdapterPath';
200
+ const origin = `${this.id}-${meth}`;
201
+ log.trace(origin);
202
+
203
+ super.iapFindAdapterPath(apiPath, callback);
204
+ }
205
+
201
206
  /**
202
207
  * @summary Runs troubleshoot scripts for adapter
203
208
  *
@@ -298,176 +303,93 @@ class AmazonRoute53 extends AdapterBaseCl {
298
303
  }
299
304
  }
300
305
 
301
- /* BROKER CALLS */
302
306
  /**
303
- * @summary Determines if this adapter supports the specific entity
307
+ * @summary Deactivate adapter tasks
304
308
  *
305
- * @function iapHasAdapterEntity
306
- * @param {String} entityType - the entity type to check for
307
- * @param {String/Array} entityId - the specific entity we are looking for
309
+ * @function iapDeactivateTasks
308
310
  *
309
- * @param {Callback} callback - An array of whether the adapter can has the
310
- * desired capability or an error
311
+ * @param {Array} tasks - List of tasks to deactivate
312
+ * @param {Callback} callback
311
313
  */
312
- iapHasAdapterEntity(entityType, entityId, callback) {
313
- const origin = `${this.id}-adapter-iapHasAdapterEntity`;
314
+ iapDeactivateTasks(tasks, callback) {
315
+ const meth = 'adapter-iapDeactivateTasks';
316
+ const origin = `${this.id}-${meth}`;
314
317
  log.trace(origin);
315
318
 
316
- // Make the call -
317
- // iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
318
- return this.iapVerifyAdapterCapability(entityType, null, entityId, callback);
319
+ try {
320
+ return super.iapDeactivateTasks(tasks, callback);
321
+ } catch (err) {
322
+ log.error(`${origin}: ${err}`);
323
+ return callback(null, err);
324
+ }
319
325
  }
320
326
 
321
327
  /**
322
- * @summary Provides a way for the adapter to tell north bound integrations
323
- * whether the adapter supports type, action and specific entity
328
+ * @summary Activate adapter tasks that have previously been deactivated
324
329
  *
325
- * @function iapVerifyAdapterCapability
326
- * @param {String} entityType - the entity type to check for
327
- * @param {String} actionType - the action type to check for
328
- * @param {String/Array} entityId - the specific entity we are looking for
330
+ * @function iapActivateTasks
329
331
  *
330
- * @param {Callback} callback - An array of whether the adapter can has the
331
- * desired capability or an error
332
+ * @param {Array} tasks - List of tasks to activate
333
+ * @param {Callback} callback
332
334
  */
333
- iapVerifyAdapterCapability(entityType, actionType, entityId, callback) {
334
- const meth = 'adapterBase-iapVerifyAdapterCapability';
335
+ iapActivateTasks(tasks, callback) {
336
+ const meth = 'adapter-iapActivateTasks';
335
337
  const origin = `${this.id}-${meth}`;
336
338
  log.trace(origin);
337
339
 
338
- // if caching
339
- if (this.caching) {
340
- // Make the call - iapVerifyAdapterCapability(entityType, actionType, entityId, callback)
341
- return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (results, error) => {
342
- if (error) {
343
- return callback(null, error);
344
- }
345
-
346
- // if the cache needs to be updated, update and try again
347
- if (results && results[0] === 'needupdate') {
348
- switch (entityType) {
349
- case 'template_entity': {
350
- // if the cache is invalid, update the cache
351
- return this.getEntities(null, null, null, null, (data, err) => {
352
- if (err) {
353
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Could not update entity: $VARIABLE$, cache', [entityType], null, null, null);
354
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
355
- return callback(null, errorObj);
356
- }
357
-
358
- // need to check the cache again since it has been updated
359
- return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, entityId, (vcapable, verror) => {
360
- if (verror) {
361
- return callback(null, verror);
362
- }
363
-
364
- return this.capabilityResults(vcapable, callback);
365
- });
366
- });
367
- }
368
- default: {
369
- // unsupported entity type
370
- const result = [false];
371
-
372
- // put false in array for all entities
373
- if (Array.isArray(entityId)) {
374
- for (let e = 1; e < entityId.length; e += 1) {
375
- result.push(false);
376
- }
377
- }
378
-
379
- return callback(result);
380
- }
381
- }
382
- }
383
-
384
- // return the results
385
- return this.capabilityResults(results, callback);
386
- });
387
- }
388
-
389
- // if no entity id
390
- if (!entityId) {
391
- // need to check the cache again since it has been updated
392
- return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
393
- if (verror) {
394
- return callback(null, verror);
395
- }
396
-
397
- return this.capabilityResults(vcapable, callback);
398
- });
340
+ try {
341
+ return super.iapActivateTasks(tasks, callback);
342
+ } catch (err) {
343
+ log.error(`${origin}: ${err}`);
344
+ return callback(null, err);
399
345
  }
346
+ }
400
347
 
401
- // if not caching
402
- switch (entityType) {
403
- case 'template_entity': {
404
- // need to get the entities to check
405
- return this.getEntities(null, null, null, null, (data, err) => {
406
- if (err) {
407
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Could not update entity: $VARIABLE$, cache', [entityType], null, null, null);
408
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
409
- return callback(null, errorObj);
410
- }
411
-
412
- // need to check the cache again since it has been updated
413
- return this.requestHandlerInst.iapVerifyAdapterCapability(entityType, actionType, null, (vcapable, verror) => {
414
- if (verror) {
415
- return callback(null, verror);
416
- }
417
-
418
- // is the entity in the list?
419
- const isEntity = this.entityInList(entityId, data.response, callback);
420
- const res = [];
421
-
422
- // not found
423
- for (let i = 0; i < isEntity.length; i += 1) {
424
- if (vcapable) {
425
- res.push(isEntity[i]);
426
- } else {
427
- res.push(false);
428
- }
429
- }
430
-
431
- return callback(res);
432
- });
433
- });
434
- }
435
- default: {
436
- // unsupported entity type
437
- const result = [false];
438
-
439
- // put false in array for all entities
440
- if (Array.isArray(entityId)) {
441
- for (let e = 1; e < entityId.length; e += 1) {
442
- result.push(false);
443
- }
444
- }
348
+ /* CACHE CALLS */
349
+ /**
350
+ * @summary Populate the cache for the given entities
351
+ *
352
+ * @function iapPopulateEntityCache
353
+ * @param {String/Array of Strings} entityType - the entity type(s) to populate
354
+ * @param {Callback} callback - whether the cache was updated or not for each entity type
355
+ *
356
+ * @returns status of the populate
357
+ */
358
+ iapPopulateEntityCache(entityTypes, callback) {
359
+ const meth = 'adapter-iapPopulateEntityCache';
360
+ const origin = `${this.id}-${meth}`;
361
+ log.trace(origin);
445
362
 
446
- return callback(result);
447
- }
363
+ try {
364
+ return super.iapPopulateEntityCache(entityTypes, callback);
365
+ } catch (err) {
366
+ log.error(`${origin}: ${err}`);
367
+ return callback(null, err);
448
368
  }
449
369
  }
450
370
 
451
371
  /**
452
- * @summary Updates the cache for all entities by call the get All entity method
453
- *
454
- * @function iapUpdateAdapterEntityCache
372
+ * @summary Retrieves data from cache for specified entity type
455
373
  *
374
+ * @function iapRetrieveEntitiesCache
375
+ * @param {String} entityType - entity of which to retrieve
376
+ * @param {Object} options - settings of which data to return and how to return it
377
+ * @param {Callback} callback - the data if it was retrieved
456
378
  */
457
- iapUpdateAdapterEntityCache() {
458
- const origin = `${this.id}-adapter-iapUpdateAdapterEntityCache`;
379
+ iapRetrieveEntitiesCache(entityType, options, callback) {
380
+ const meth = 'adapter-iapCheckEiapRetrieveEntitiesCachentityCached';
381
+ const origin = `${this.id}-${meth}`;
459
382
  log.trace(origin);
460
383
 
461
- if (this.caching) {
462
- // if the cache is invalid, update the cache
463
- this.getEntities(null, null, null, null, (data, err) => {
464
- if (err) {
465
- log.trace(`${origin}: Could not load template_entity into cache - ${err}`);
466
- }
467
- });
384
+ try {
385
+ return super.iapRetrieveEntitiesCache(entityType, options, callback);
386
+ } catch (err) {
387
+ log.error(`${origin}: ${err}`);
388
+ return callback(null, err);
468
389
  }
469
390
  }
470
391
 
392
+ /* BROKER CALLS */
471
393
  /**
472
394
  * @summary Determines if this adapter supports any in a list of entities
473
395
  *
@@ -484,7 +406,7 @@ class AmazonRoute53 extends AdapterBaseCl {
484
406
  log.trace(origin);
485
407
 
486
408
  try {
487
- return super.hasEntities(entityType, entityList, callback);
409
+ return super.hasEntitiesAuth(entityType, entityList, callOptions, callback);
488
410
  } catch (err) {
489
411
  log.error(`${origin}: ${err}`);
490
412
  return callback(null, err);
@@ -506,7 +428,7 @@ class AmazonRoute53 extends AdapterBaseCl {
506
428
  log.trace(origin);
507
429
 
508
430
  try {
509
- return super.getDevice(deviceName, callback);
431
+ return super.getDeviceAuth(deviceName, callOptions, callback);
510
432
  } catch (err) {
511
433
  log.error(`${origin}: ${err}`);
512
434
  return callback(null, err);
@@ -528,7 +450,29 @@ class AmazonRoute53 extends AdapterBaseCl {
528
450
  log.trace(origin);
529
451
 
530
452
  try {
531
- return super.getDevicesFiltered(options, callback);
453
+ // if no filtering
454
+ if (!options || !options.filter || !options.filter.name) {
455
+ return super.getDevicesFilteredAuth({}, callOptions, callback);
456
+ }
457
+
458
+ // Need to do filtering here because AWS does not support filtering with contains
459
+ return super.getDevicesFilteredAuth({}, callOptions, (devices, error) => {
460
+ if (error) {
461
+ return callback(null, error);
462
+ }
463
+
464
+ if (devices.list) {
465
+ const filterDevices = [];
466
+ for (let i = 0; i < devices.list.length; i += 1) {
467
+ if (devices.list[i].name.includes(options.filter.name)) {
468
+ filterDevices.push(devices.list[i]);
469
+ }
470
+ }
471
+ return callback({ total: filterDevices.length, list: filterDevices });
472
+ }
473
+
474
+ return devices;
475
+ });
532
476
  } catch (err) {
533
477
  log.error(`${origin}: ${err}`);
534
478
  return callback(null, err);
@@ -550,7 +494,7 @@ class AmazonRoute53 extends AdapterBaseCl {
550
494
  log.trace(origin);
551
495
 
552
496
  try {
553
- return super.isAlive(deviceName, callback);
497
+ return super.isAliveAuth(deviceName, callOptions, callback);
554
498
  } catch (err) {
555
499
  log.error(`${origin}: ${err}`);
556
500
  return callback(null, err);
@@ -573,7 +517,7 @@ class AmazonRoute53 extends AdapterBaseCl {
573
517
  log.trace(origin);
574
518
 
575
519
  try {
576
- return super.getConfig(deviceName, format, callback);
520
+ return super.getConfigAuth(deviceName, format, callOptions, callback);
577
521
  } catch (err) {
578
522
  log.error(`${origin}: ${err}`);
579
523
  return callback(null, err);
@@ -594,7 +538,7 @@ class AmazonRoute53 extends AdapterBaseCl {
594
538
  log.trace(origin);
595
539
 
596
540
  try {
597
- return super.iapGetDeviceCount(callback);
541
+ return super.iapGetDeviceCountAuth(callOptions, callback);
598
542
  } catch (err) {
599
543
  log.error(`${origin}: ${err}`);
600
544
  return callback(null, err);
@@ -602,6 +546,38 @@ class AmazonRoute53 extends AdapterBaseCl {
602
546
  }
603
547
 
604
548
  /* GENERIC ADAPTER REQUEST - allows extension of adapter without new calls being added */
549
+ /**
550
+ * Makes the requested generic call
551
+ *
552
+ * @function iapExpandedGenericAdapterRequest
553
+ * @param {Object} metadata - metadata for the call (optional).
554
+ * Can be a stringified Object.
555
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (optional)
556
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (optional)
557
+ * @param {Object} pathVars - the parameters to be put within the url path (optional).
558
+ * Can be a stringified Object.
559
+ * @param {Object} queryData - the parameters to be put on the url (optional).
560
+ * Can be a stringified Object.
561
+ * @param {Object} requestBody - the body to add to the request (optional).
562
+ * Can be a stringified Object.
563
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
564
+ * Can be a stringified Object.
565
+ * @param {getCallback} callback - a callback function to return the result (Generics)
566
+ * or the error
567
+ */
568
+ iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback) {
569
+ const meth = 'adapter-iapExpandedGenericAdapterRequest';
570
+ const origin = `${this.id}-${meth}`;
571
+ log.trace(origin);
572
+
573
+ try {
574
+ return super.iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback);
575
+ } catch (err) {
576
+ log.error(`${origin}: ${err}`);
577
+ return callback(null, err);
578
+ }
579
+ }
580
+
605
581
  /**
606
582
  * Makes the requested generic call
607
583
  *
@@ -622,108 +598,11 @@ class AmazonRoute53 extends AdapterBaseCl {
622
598
  const origin = `${this.id}-${meth}`;
623
599
  log.trace(origin);
624
600
 
625
- if (this.suspended && this.suspendMode === 'error') {
626
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
627
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
628
- return callback(null, errorObj);
629
- }
630
-
631
- /* HERE IS WHERE YOU VALIDATE DATA */
632
- if (uriPath === undefined || uriPath === null || uriPath === '') {
633
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
634
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
635
- return callback(null, errorObj);
636
- }
637
- if (restMethod === undefined || restMethod === null || restMethod === '') {
638
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
639
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
640
- return callback(null, errorObj);
641
- }
642
-
643
- /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
644
- // remove any leading / and split the uripath into path variables
645
- let myPath = uriPath;
646
- while (myPath.indexOf('/') === 0) {
647
- myPath = myPath.substring(1);
648
- }
649
- const pathVars = myPath.split('/');
650
- const queryParamsAvailable = queryData;
651
- const queryParams = {};
652
- const bodyVars = requestBody;
653
-
654
- // loop in template. long callback arg name to avoid identifier conflicts
655
- Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
656
- if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
657
- && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
658
- queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
659
- }
660
- });
661
-
662
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
663
- let thisHeaderData = null;
664
- // if the additional headers was passed in as a string parse the json into an object
665
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
666
- try {
667
- // parse the additional headers object that was passed in
668
- thisHeaderData = JSON.parse(thisHeaderData);
669
- } catch (err) {
670
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
671
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
672
- return callback(null, errorObj);
673
- }
674
- } else if (thisHeaderData === null) {
675
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
676
- }
677
- // add headers if provided
678
- if (addlHeaders) {
679
- Object.assign(thisHeaderData, addlHeaders);
680
- }
681
-
682
- const reqObj = {
683
- payload: bodyVars,
684
- uriPathVars: pathVars,
685
- uriQuery: queryParams,
686
- addlHeaders: thisHeaderData
687
- };
688
-
689
- // determine the call and return flag
690
- let action = 'getGenerics';
691
- let returnF = true;
692
- if (restMethod.toUpperCase() === 'POST') {
693
- action = 'createGeneric';
694
- } else if (restMethod.toUpperCase() === 'PUT') {
695
- action = 'updateGeneric';
696
- } else if (restMethod.toUpperCase() === 'PATCH') {
697
- action = 'patchGeneric';
698
- } else if (restMethod.toUpperCase() === 'DELETE') {
699
- action = 'deleteGeneric';
700
- returnF = false;
701
- }
702
-
703
601
  try {
704
- // Make the call -
705
- // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
706
- return this.getAuthorizationAndIdentifyRequest('.generic', action, reqObj, returnF, `${this.allProps.base_path}/${this.allProps.version}/${uriPath}/?${querystring.stringify(queryParams)}`, null, null, (irReturnData, irReturnError) => {
707
- // if we received an error or their is no response on the results
708
- // return an error
709
- if (irReturnError) {
710
- /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
711
- return callback(null, irReturnError);
712
- }
713
- if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
714
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
715
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
716
- return callback(null, errorObj);
717
- }
718
-
719
- /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
720
- // return the response
721
- return callback(irReturnData, null);
722
- });
723
- } catch (ex) {
724
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
725
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
726
- return callback(null, errorObj);
602
+ return super.genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback);
603
+ } catch (err) {
604
+ log.error(`${origin}: ${err}`);
605
+ return callback(null, err);
727
606
  }
728
607
  }
729
608
 
@@ -747,109 +626,56 @@ class AmazonRoute53 extends AdapterBaseCl {
747
626
  const origin = `${this.id}-${meth}`;
748
627
  log.trace(origin);
749
628
 
750
- if (this.suspended && this.suspendMode === 'error') {
751
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
752
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
753
- return callback(null, errorObj);
754
- }
755
-
756
- /* HERE IS WHERE YOU VALIDATE DATA */
757
- if (uriPath === undefined || uriPath === null || uriPath === '') {
758
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
759
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
760
- return callback(null, errorObj);
761
- }
762
- if (restMethod === undefined || restMethod === null || restMethod === '') {
763
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
764
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
765
- return callback(null, errorObj);
766
- }
767
-
768
- /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
769
- // remove any leading / and split the uripath into path variables
770
- let myPath = uriPath;
771
- while (myPath.indexOf('/') === 0) {
772
- myPath = myPath.substring(1);
629
+ try {
630
+ return super.genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback);
631
+ } catch (err) {
632
+ log.error(`${origin}: ${err}`);
633
+ return callback(null, err);
773
634
  }
774
- const pathVars = myPath.split('/');
775
- const queryParamsAvailable = queryData;
776
- const queryParams = {};
777
- const bodyVars = requestBody;
635
+ }
778
636
 
779
- // loop in template. long callback arg name to avoid identifier conflicts
780
- Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
781
- if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
782
- && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
783
- queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
784
- }
785
- });
637
+ /* INVENTORY CALLS */
638
+ /**
639
+ * @summary run the adapter lint script to return the results.
640
+ *
641
+ * @function iapRunAdapterLint
642
+ * @param {Callback} callback - callback function
643
+ */
644
+ iapRunAdapterLint(callback) {
645
+ const meth = 'adapter-iapRunAdapterLint';
646
+ const origin = `${this.id}-${meth}`;
647
+ log.trace(origin);
786
648
 
787
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
788
- let thisHeaderData = null;
789
- // if the additional headers was passed in as a string parse the json into an object
790
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
791
- try {
792
- // parse the additional headers object that was passed in
793
- thisHeaderData = JSON.parse(thisHeaderData);
794
- } catch (err) {
795
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
796
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
797
- return callback(null, errorObj);
798
- }
799
- } else if (thisHeaderData === null) {
800
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
801
- }
802
- // add headers if provided
803
- if (addlHeaders) {
804
- Object.assign(thisHeaderData, addlHeaders);
805
- }
649
+ return super.iapRunAdapterLint(callback);
650
+ }
806
651
 
807
- const reqObj = {
808
- payload: bodyVars,
809
- uriPathVars: pathVars,
810
- uriQuery: queryParams,
811
- addlHeaders: thisHeaderData
812
- };
652
+ /**
653
+ * @summary run the adapter test scripts (baseunit and unit) to return the results.
654
+ * can not run integration as there can be implications with that.
655
+ *
656
+ * @function iapRunAdapterTests
657
+ * @param {Callback} callback - callback function
658
+ */
659
+ iapRunAdapterTests(callback) {
660
+ const meth = 'adapter-iapRunAdapterTests';
661
+ const origin = `${this.id}-${meth}`;
662
+ log.trace(origin);
813
663
 
814
- // determine the call and return flag
815
- let action = 'getGenericsNoBase';
816
- let returnF = true;
817
- if (restMethod.toUpperCase() === 'POST') {
818
- action = 'createGenericNoBase';
819
- } else if (restMethod.toUpperCase() === 'PUT') {
820
- action = 'updateGenericNoBase';
821
- } else if (restMethod.toUpperCase() === 'PATCH') {
822
- action = 'patchGenericNoBase';
823
- } else if (restMethod.toUpperCase() === 'DELETE') {
824
- action = 'deleteGenericNoBase';
825
- returnF = false;
826
- }
664
+ return super.iapRunAdapterTests(callback);
665
+ }
827
666
 
828
- try {
829
- // Make the call -
830
- // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
831
- return this.getAuthorizationAndIdentifyRequest('.generic', action, reqObj, returnF, `${uriPath}/?${querystring.stringify(queryParams)}`, null, null, (irReturnData, irReturnError) => {
832
- // if we received an error or their is no response on the results
833
- // return an error
834
- if (irReturnError) {
835
- /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
836
- return callback(null, irReturnError);
837
- }
838
- if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
839
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequestNoBasePath'], null, null, null);
840
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
841
- return callback(null, errorObj);
842
- }
667
+ /**
668
+ * @summary provide inventory information abbout the adapter
669
+ *
670
+ * @function iapGetAdapterInventory
671
+ * @param {Callback} callback - callback function
672
+ */
673
+ iapGetAdapterInventory(callback) {
674
+ const meth = 'adapter-iapGetAdapterInventory';
675
+ const origin = `${this.id}-${meth}`;
676
+ log.trace(origin);
843
677
 
844
- /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
845
- // return the response
846
- return callback(irReturnData, null);
847
- });
848
- } catch (ex) {
849
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
850
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
851
- return callback(null, errorObj);
852
- }
678
+ return super.iapGetAdapterInventory(callback);
853
679
  }
854
680
 
855
681
  /**
@@ -877,140 +703,6 @@ class AmazonRoute53 extends AdapterBaseCl {
877
703
  * @param {String} error - any error that occurred
878
704
  */
879
705
 
880
- /**
881
- * @summary Gets the hcma authorization for the call
882
- *
883
- * @function getAuthorization
884
- * @param {string} method - the method for the action we are setting authorization for
885
- * @param {string} pathBody - the path or body for the action we are setting authorization for
886
- *
887
- * @return {Object} the headers to add to the request
888
- */
889
- getAuthorization(method, uripath, pathBody, requestHeaders, STSParams, roleName, callback) {
890
- const origin = `${this.id}-adapter-getAuthorization`;
891
- log.trace(origin);
892
-
893
- // set up the options for the AWS header
894
- const options = {
895
- host: this.allProps.host,
896
- path: uripath.replace(/\/\//g, '/'),
897
- service: 'route53',
898
- region: this.allProps.region
899
- };
900
- if (requestHeaders) {
901
- options.headers = requestHeaders;
902
- }
903
-
904
- if (method !== 'GET' && method !== 'DELETE') {
905
- options.body = JSON.stringify(pathBody);
906
- }
907
-
908
- // if we are using STS
909
- if (STSParams) {
910
- log.info('Using STS for AWS Authentication');
911
-
912
- // set the original AWS access information (from properties)
913
- AWS.config.update({
914
- sessionToken: this.allProps.authentication.aws_session_token,
915
- accessKeyId: this.allProps.authentication.aws_access_key,
916
- secretAccessKey: this.allProps.authentication.aws_secret_key,
917
- region: this.allProps.region
918
- });
919
-
920
- // use STS to get the AWS access information for the user defined in STWS Params
921
- const sts = new AWS.STS();
922
- const stsData = {
923
- RoleArn: STSParams.RoleArn,
924
- RoleSessionName: STSParams.RoleSessionName,
925
- DurationSeconds: 3600
926
- };
927
- return sts.assumeRole(stsData, (err, data) => {
928
- if (err) {
929
- throw err;
930
- }
931
- // extract the user specific info from the response
932
- const accessKeyId = data.Credentials.AccessKeyId;
933
- const secretAccessKey = data.Credentials.SecretAccessKey;
934
- const sessionToken = data.Credentials.SessionToken;
935
-
936
- // call the signature with the user specific information
937
- const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey });
938
- if (sessionToken) {
939
- authOpts.headers['X-Amz-Security-Token'] = sessionToken;
940
- }
941
-
942
- // return the headers
943
- return callback(authOpts.headers);
944
- });
945
- }
946
-
947
- // if we are using adapter properties
948
- if (!roleName) {
949
- log.info('Using Adapter PROPERTIES for AWS Authentication');
950
-
951
- // call the signature with the property information
952
- const authOpts = aws4.sign(options, { accessKeyId: this.allProps.authentication.aws_access_key, secretAccessKey: this.allProps.authentication.aws_secret_key });
953
- if (this.allProps.authentication.aws_session_token) {
954
- authOpts.headers['X-Amz-Security-Token'] = this.allProps.authentication.aws_session_token;
955
- }
956
-
957
- // return the headers
958
- return callback(authOpts.headers);
959
- }
960
-
961
- // if we are using a provided role name
962
- log.info('Using roleName for AWS Authentication');
963
-
964
- const getTokenOptions = {
965
- method: 'PUT',
966
- url: 'http://169.254.169.254/latest/api/token',
967
- headers: {
968
- 'X-aws-ec2-metadata-token-ttl-seconds': 21600
969
- }
970
- };
971
-
972
- return requestCall(getTokenOptions, (error1, response) => {
973
- if (error1) {
974
- return callback(null, error1);
975
- }
976
- if (!response || !response.body) {
977
- return callback(null, 'No Authentication Token');
978
- }
979
- const tokenKey = response.body;
980
- const toptions = {
981
- method: 'GET',
982
- url: `http://169.254.169.254/latest/meta-data/iam/security-credentials/${roleName}`,
983
- headers: {
984
- 'X-aws-ec2-metadata-token': tokenKey
985
- }
986
- };
987
- log.debug(`getting keys for user: ${roleName}`);
988
- return requestCall(toptions, (error2, response2) => {
989
- if (error2) {
990
- return callback(null, error2);
991
- }
992
- if (!response2 || !response2.body) {
993
- return callback(null, 'No Authentication Keys');
994
- }
995
- try {
996
- const awsResponse = JSON.parse(response2.body);
997
- const accessKeyId = awsResponse.AccessKeyId;
998
- const secretAccessKey = awsResponse.SecretAccessKey;
999
- const sessionToken = awsResponse.Token;
1000
- log.debug(`getting call signature with credntials for user: ${roleName}`);
1001
- const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey });
1002
- if (sessionToken) {
1003
- authOpts.headers['X-Amz-Security-Token'] = sessionToken;
1004
- }
1005
- // return the headers
1006
- return callback(authOpts.headers);
1007
- } catch (e) {
1008
- return callback(null, e);
1009
- }
1010
- });
1011
- });
1012
- }
1013
-
1014
706
  /**
1015
707
  * @summary wrapper for identifyRequest which sets up the necessary AWS authentication headers first
1016
708
  *
@@ -1030,14 +722,35 @@ class AmazonRoute53 extends AdapterBaseCl {
1030
722
  const meth = 'adapter-getAuthorizationAndIdentifyRequest';
1031
723
  const origin = `${this.id}-${meth}`;
1032
724
  log.trace(origin);
725
+ let querySchema = null;
1033
726
 
1034
727
  try {
728
+ // get entity schema for translating query vars
729
+ this.requestHandlerInst.propUtil.getEntitySchema(entity, action, null, null, async (schema, error) => {
730
+ if (error) {
731
+ console.log(error);
732
+ }
733
+ querySchema = schema;
734
+ });
735
+
736
+ // translate query vars
737
+ const thisQdata = this.requestHandlerInst.transUtil.formatInputData(requestObj.uriQuery);
738
+ thisQdata.ph_request_type = action;
739
+ const translatedQuery = this.requestHandlerInst.transUtil.mapToOutboundEntity(thisQdata, querySchema.requestSchema);
740
+
741
+ // remove the ph_request_type from the call
742
+ delete thisQdata.ph_request_type;
743
+
744
+ // replace queryvars with the translatedQuery
745
+ const regex = /(?<=\?)[^?]+/i;
746
+ const uriPathTranslated = uriPath.replace(regex, querystring.stringify(translatedQuery));
747
+
1035
748
  // using this for method now - would like to use for path in the future
1036
749
  const entitySchema = this.requestHandlerInst.propUtil.getEntitySchemaFromFS(entity, action);
1037
750
  // thisPath = this.requestHandlerInst.restHandler.buildRequestPath(); - Needs to be exposed
1038
751
 
1039
752
  // Call to get the signature for the call
1040
- return this.getAuthorization(entitySchema.method, uriPath, requestObj.payload, requestObj.addlHeaders, stsParams, roleName, (signature, sigerr) => {
753
+ return this.requestHandlerInst.getAWSAuthorization(entitySchema.method, requestObj, uriPathTranslated, 'route53', stsParams, roleName, (signature, sigerr) => {
1041
754
  if (sigerr) {
1042
755
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Can not Authenticate ${sigerr}`, [], null, null, null);
1043
756
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
@@ -1098,7 +811,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1098
811
  const meth = 'adapter-activateKeySigningKeySTSRole';
1099
812
  const origin = `${this.id}-${meth}`;
1100
813
  log.trace(origin);
1101
- const restVer = this.allProps.aws_ver;
1102
814
 
1103
815
  if (this.suspended && this.suspendMode === 'error') {
1104
816
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1121,7 +833,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1121
833
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1122
834
  const queryParamsAvailable = {};
1123
835
  const queryParams = {};
1124
- const pathVars = [restVer, hostedZoneId, name];
836
+ const pathVars = [hostedZoneId, name];
1125
837
  const bodyVars = '';
1126
838
 
1127
839
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1132,35 +844,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1132
844
  }
1133
845
  });
1134
846
 
1135
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1136
- let thisHeaderData = null;
1137
- // if the additional headers was passed in as a string parse the json into an object
1138
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1139
- try {
1140
- // parse the additional headers object that was passed in
1141
- thisHeaderData = JSON.parse(thisHeaderData);
1142
- } catch (err) {
1143
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1144
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1145
- return callback(null, errorObj);
1146
- }
1147
- } else if (thisHeaderData === null) {
1148
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
1149
- }
1150
-
1151
847
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1152
848
  // see adapter code documentation for more information on the request object's fields
1153
849
  const reqObj = {
1154
850
  payload: bodyVars,
1155
851
  uriPathVars: pathVars,
1156
852
  uriQuery: queryParams,
1157
- addlHeaders: thisHeaderData
853
+ authData: {
854
+ stsParams,
855
+ roleName
856
+ }
1158
857
  };
1159
858
 
1160
859
  try {
1161
860
  // Make the call -
1162
861
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1163
- return this.getAuthorizationAndIdentifyRequest('Rest', 'activateKeySigningKey', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/keysigningkey/${hostedZoneId}/${name}/activate?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
862
+ return this.requestHandlerInst.identifyRequest('Rest', 'activateKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
1164
863
  // if we received an error or their is no response on the results
1165
864
  // return an error
1166
865
  if (irReturnError) {
@@ -1226,7 +925,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1226
925
  const meth = 'adapter-associateVPCWithHostedZoneSTSRole';
1227
926
  const origin = `${this.id}-${meth}`;
1228
927
  log.trace(origin);
1229
- const restVer = this.allProps.aws_ver;
1230
928
 
1231
929
  if (this.suspended && this.suspendMode === 'error') {
1232
930
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1249,7 +947,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1249
947
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1250
948
  const queryParamsAvailable = {};
1251
949
  const queryParams = {};
1252
- const pathVars = [restVer, id];
950
+ const pathVars = [id];
1253
951
  const bodyVars = body;
1254
952
 
1255
953
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1260,35 +958,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1260
958
  }
1261
959
  });
1262
960
 
1263
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1264
- let thisHeaderData = null;
1265
- // if the additional headers was passed in as a string parse the json into an object
1266
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1267
- try {
1268
- // parse the additional headers object that was passed in
1269
- thisHeaderData = JSON.parse(thisHeaderData);
1270
- } catch (err) {
1271
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1272
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1273
- return callback(null, errorObj);
1274
- }
1275
- } else if (thisHeaderData === null) {
1276
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
1277
- }
1278
-
1279
961
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1280
962
  // see adapter code documentation for more information on the request object's fields
1281
963
  const reqObj = {
1282
964
  payload: bodyVars,
1283
965
  uriPathVars: pathVars,
1284
966
  uriQuery: queryParams,
1285
- addlHeaders: thisHeaderData
967
+ authData: {
968
+ stsParams,
969
+ roleName
970
+ }
1286
971
  };
1287
972
 
1288
973
  try {
1289
974
  // Make the call -
1290
975
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1291
- return this.getAuthorizationAndIdentifyRequest('Rest', 'associateVPCWithHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/associatevpc?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
976
+ return this.requestHandlerInst.identifyRequest('Rest', 'associateVPCWithHostedZone', reqObj, true, (irReturnData, irReturnError) => {
1292
977
  // if we received an error or their is no response on the results
1293
978
  // return an error
1294
979
  if (irReturnError) {
@@ -1354,7 +1039,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1354
1039
  const meth = 'adapter-changeResourceRecordSetsSTSRole';
1355
1040
  const origin = `${this.id}-${meth}`;
1356
1041
  log.trace(origin);
1357
- const restVer = this.allProps.aws_ver;
1358
1042
 
1359
1043
  if (this.suspended && this.suspendMode === 'error') {
1360
1044
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1377,7 +1061,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1377
1061
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1378
1062
  const queryParamsAvailable = {};
1379
1063
  const queryParams = {};
1380
- const pathVars = [restVer, id];
1064
+ const pathVars = [id];
1381
1065
  const bodyVars = body;
1382
1066
 
1383
1067
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1388,35 +1072,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1388
1072
  }
1389
1073
  });
1390
1074
 
1391
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1392
- let thisHeaderData = null;
1393
- // if the additional headers was passed in as a string parse the json into an object
1394
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1395
- try {
1396
- // parse the additional headers object that was passed in
1397
- thisHeaderData = JSON.parse(thisHeaderData);
1398
- } catch (err) {
1399
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1400
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1401
- return callback(null, errorObj);
1402
- }
1403
- } else if (thisHeaderData === null) {
1404
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
1405
- }
1406
-
1407
1075
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1408
1076
  // see adapter code documentation for more information on the request object's fields
1409
1077
  const reqObj = {
1410
1078
  payload: bodyVars,
1411
1079
  uriPathVars: pathVars,
1412
1080
  uriQuery: queryParams,
1413
- addlHeaders: thisHeaderData
1081
+ authData: {
1082
+ stsParams,
1083
+ roleName
1084
+ }
1414
1085
  };
1415
1086
 
1416
1087
  try {
1417
1088
  // Make the call -
1418
1089
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1419
- return this.getAuthorizationAndIdentifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/rrset/?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1090
+ return this.requestHandlerInst.identifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
1420
1091
  // if we received an error or their is no response on the results
1421
1092
  // return an error
1422
1093
  if (irReturnError) {
@@ -1484,7 +1155,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1484
1155
  const meth = 'adapter-changeTagsForResourceSTSRole';
1485
1156
  const origin = `${this.id}-${meth}`;
1486
1157
  log.trace(origin);
1487
- const restVer = this.allProps.aws_ver;
1488
1158
 
1489
1159
  if (this.suspended && this.suspendMode === 'error') {
1490
1160
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1512,7 +1182,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1512
1182
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1513
1183
  const queryParamsAvailable = {};
1514
1184
  const queryParams = {};
1515
- const pathVars = [restVer, resourceType, resourceId];
1185
+ const pathVars = [resourceType, resourceId];
1516
1186
  const bodyVars = body;
1517
1187
 
1518
1188
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1523,35 +1193,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1523
1193
  }
1524
1194
  });
1525
1195
 
1526
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1527
- let thisHeaderData = null;
1528
- // if the additional headers was passed in as a string parse the json into an object
1529
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1530
- try {
1531
- // parse the additional headers object that was passed in
1532
- thisHeaderData = JSON.parse(thisHeaderData);
1533
- } catch (err) {
1534
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1535
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1536
- return callback(null, errorObj);
1537
- }
1538
- } else if (thisHeaderData === null) {
1539
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
1540
- }
1541
-
1542
1196
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1543
1197
  // see adapter code documentation for more information on the request object's fields
1544
1198
  const reqObj = {
1545
1199
  payload: bodyVars,
1546
1200
  uriPathVars: pathVars,
1547
1201
  uriQuery: queryParams,
1548
- addlHeaders: thisHeaderData
1202
+ authData: {
1203
+ stsParams,
1204
+ roleName
1205
+ }
1549
1206
  };
1550
1207
 
1551
1208
  try {
1552
1209
  // Make the call -
1553
1210
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1554
- return this.getAuthorizationAndIdentifyRequest('Rest', 'changeTagsForResource', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/tags/${resourceType}/${resourceId}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1211
+ return this.requestHandlerInst.identifyRequest('Rest', 'changeTagsForResource', reqObj, true, (irReturnData, irReturnError) => {
1555
1212
  // if we received an error or their is no response on the results
1556
1213
  // return an error
1557
1214
  if (irReturnError) {
@@ -1617,7 +1274,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1617
1274
  const meth = 'adapter-listTagsForResourceSTSRole';
1618
1275
  const origin = `${this.id}-${meth}`;
1619
1276
  log.trace(origin);
1620
- const restVer = this.allProps.aws_ver;
1621
1277
 
1622
1278
  if (this.suspended && this.suspendMode === 'error') {
1623
1279
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1640,7 +1296,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1640
1296
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1641
1297
  const queryParamsAvailable = {};
1642
1298
  const queryParams = {};
1643
- const pathVars = [restVer, resourceType, resourceId];
1299
+ const pathVars = [resourceType, resourceId];
1644
1300
  const bodyVars = {};
1645
1301
 
1646
1302
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1651,35 +1307,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1651
1307
  }
1652
1308
  });
1653
1309
 
1654
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1655
- let thisHeaderData = null;
1656
- // if the additional headers was passed in as a string parse the json into an object
1657
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1658
- try {
1659
- // parse the additional headers object that was passed in
1660
- thisHeaderData = JSON.parse(thisHeaderData);
1661
- } catch (err) {
1662
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1663
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1664
- return callback(null, errorObj);
1665
- }
1666
- } else if (thisHeaderData === null) {
1667
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
1668
- }
1669
-
1670
1310
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1671
1311
  // see adapter code documentation for more information on the request object's fields
1672
1312
  const reqObj = {
1673
1313
  payload: bodyVars,
1674
1314
  uriPathVars: pathVars,
1675
1315
  uriQuery: queryParams,
1676
- addlHeaders: thisHeaderData
1316
+ authData: {
1317
+ stsParams,
1318
+ roleName
1319
+ }
1677
1320
  };
1678
1321
 
1679
1322
  try {
1680
1323
  // Make the call -
1681
1324
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1682
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTagsForResource', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/tags/${resourceType}/${resourceId}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1325
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTagsForResource', reqObj, true, (irReturnData, irReturnError) => {
1683
1326
  // if we received an error or their is no response on the results
1684
1327
  // return an error
1685
1328
  if (irReturnError) {
@@ -1743,7 +1386,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1743
1386
  const meth = 'adapter-createHealthCheckSTSRole';
1744
1387
  const origin = `${this.id}-${meth}`;
1745
1388
  log.trace(origin);
1746
- const restVer = this.allProps.aws_ver;
1747
1389
 
1748
1390
  if (this.suspended && this.suspendMode === 'error') {
1749
1391
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1761,7 +1403,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1761
1403
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1762
1404
  const queryParamsAvailable = {};
1763
1405
  const queryParams = {};
1764
- const pathVars = [restVer];
1406
+ const pathVars = [];
1765
1407
  const bodyVars = body;
1766
1408
 
1767
1409
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1772,35 +1414,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1772
1414
  }
1773
1415
  });
1774
1416
 
1775
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1776
- let thisHeaderData = null;
1777
- // if the additional headers was passed in as a string parse the json into an object
1778
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1779
- try {
1780
- // parse the additional headers object that was passed in
1781
- thisHeaderData = JSON.parse(thisHeaderData);
1782
- } catch (err) {
1783
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1784
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1785
- return callback(null, errorObj);
1786
- }
1787
- } else if (thisHeaderData === null) {
1788
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
1789
- }
1790
-
1791
1417
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1792
1418
  // see adapter code documentation for more information on the request object's fields
1793
1419
  const reqObj = {
1794
1420
  payload: bodyVars,
1795
1421
  uriPathVars: pathVars,
1796
1422
  uriQuery: queryParams,
1797
- addlHeaders: thisHeaderData
1423
+ authData: {
1424
+ stsParams,
1425
+ roleName
1426
+ }
1798
1427
  };
1799
1428
 
1800
1429
  try {
1801
1430
  // Make the call -
1802
1431
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1803
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createHealthCheck', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1432
+ return this.requestHandlerInst.identifyRequest('Rest', 'createHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
1804
1433
  // if we received an error or their is no response on the results
1805
1434
  // return an error
1806
1435
  if (irReturnError) {
@@ -1870,7 +1499,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1870
1499
  const meth = 'adapter-listHealthChecksSTSRole';
1871
1500
  const origin = `${this.id}-${meth}`;
1872
1501
  log.trace(origin);
1873
- const restVer = this.allProps.aws_ver;
1874
1502
 
1875
1503
  if (this.suspended && this.suspendMode === 'error') {
1876
1504
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -1883,7 +1511,7 @@ class AmazonRoute53 extends AdapterBaseCl {
1883
1511
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
1884
1512
  const queryParamsAvailable = { marker, maxitems, maxItems, markerQuery };
1885
1513
  const queryParams = {};
1886
- const pathVars = [restVer];
1514
+ const pathVars = [];
1887
1515
  const bodyVars = {};
1888
1516
 
1889
1517
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -1894,35 +1522,22 @@ class AmazonRoute53 extends AdapterBaseCl {
1894
1522
  }
1895
1523
  });
1896
1524
 
1897
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
1898
- let thisHeaderData = null;
1899
- // if the additional headers was passed in as a string parse the json into an object
1900
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
1901
- try {
1902
- // parse the additional headers object that was passed in
1903
- thisHeaderData = JSON.parse(thisHeaderData);
1904
- } catch (err) {
1905
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
1906
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1907
- return callback(null, errorObj);
1908
- }
1909
- } else if (thisHeaderData === null) {
1910
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
1911
- }
1912
-
1913
1525
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
1914
1526
  // see adapter code documentation for more information on the request object's fields
1915
1527
  const reqObj = {
1916
1528
  payload: bodyVars,
1917
1529
  uriPathVars: pathVars,
1918
1530
  uriQuery: queryParams,
1919
- addlHeaders: thisHeaderData
1531
+ authData: {
1532
+ stsParams,
1533
+ roleName
1534
+ }
1920
1535
  };
1921
1536
 
1922
1537
  try {
1923
1538
  // Make the call -
1924
1539
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
1925
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listHealthChecks', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1540
+ return this.requestHandlerInst.identifyRequest('Rest', 'listHealthChecks', reqObj, true, (irReturnData, irReturnError) => {
1926
1541
  // if we received an error or their is no response on the results
1927
1542
  // return an error
1928
1543
  if (irReturnError) {
@@ -1986,7 +1601,6 @@ class AmazonRoute53 extends AdapterBaseCl {
1986
1601
  const meth = 'adapter-createHostedZoneSTSRole';
1987
1602
  const origin = `${this.id}-${meth}`;
1988
1603
  log.trace(origin);
1989
- const restVer = this.allProps.aws_ver;
1990
1604
 
1991
1605
  if (this.suspended && this.suspendMode === 'error') {
1992
1606
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2004,7 +1618,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2004
1618
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2005
1619
  const queryParamsAvailable = {};
2006
1620
  const queryParams = {};
2007
- const pathVars = [restVer];
1621
+ const pathVars = [];
2008
1622
  const bodyVars = body;
2009
1623
 
2010
1624
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2015,35 +1629,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2015
1629
  }
2016
1630
  });
2017
1631
 
2018
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2019
- let thisHeaderData = null;
2020
- // if the additional headers was passed in as a string parse the json into an object
2021
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2022
- try {
2023
- // parse the additional headers object that was passed in
2024
- thisHeaderData = JSON.parse(thisHeaderData);
2025
- } catch (err) {
2026
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2027
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2028
- return callback(null, errorObj);
2029
- }
2030
- } else if (thisHeaderData === null) {
2031
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
2032
- }
2033
-
2034
1632
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2035
1633
  // see adapter code documentation for more information on the request object's fields
2036
1634
  const reqObj = {
2037
1635
  payload: bodyVars,
2038
1636
  uriPathVars: pathVars,
2039
1637
  uriQuery: queryParams,
2040
- addlHeaders: thisHeaderData
1638
+ authData: {
1639
+ stsParams,
1640
+ roleName
1641
+ }
2041
1642
  };
2042
1643
 
2043
1644
  try {
2044
1645
  // Make the call -
2045
1646
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2046
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1647
+ return this.requestHandlerInst.identifyRequest('Rest', 'createHostedZone', reqObj, true, (irReturnData, irReturnError) => {
2047
1648
  // if we received an error or their is no response on the results
2048
1649
  // return an error
2049
1650
  if (irReturnError) {
@@ -2115,7 +1716,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2115
1716
  const meth = 'adapter-listHostedZonesSTSRole';
2116
1717
  const origin = `${this.id}-${meth}`;
2117
1718
  log.trace(origin);
2118
- const restVer = this.allProps.aws_ver;
2119
1719
 
2120
1720
  if (this.suspended && this.suspendMode === 'error') {
2121
1721
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2128,7 +1728,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2128
1728
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2129
1729
  const queryParamsAvailable = { marker, maxitems, delegationsetid, maxItems, markerQuery };
2130
1730
  const queryParams = {};
2131
- const pathVars = [restVer];
1731
+ const pathVars = [];
2132
1732
  const bodyVars = {};
2133
1733
 
2134
1734
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2139,35 +1739,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2139
1739
  }
2140
1740
  });
2141
1741
 
2142
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2143
- let thisHeaderData = null;
2144
- // if the additional headers was passed in as a string parse the json into an object
2145
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2146
- try {
2147
- // parse the additional headers object that was passed in
2148
- thisHeaderData = JSON.parse(thisHeaderData);
2149
- } catch (err) {
2150
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2151
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2152
- return callback(null, errorObj);
2153
- }
2154
- } else if (thisHeaderData === null) {
2155
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
2156
- }
2157
-
2158
1742
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2159
1743
  // see adapter code documentation for more information on the request object's fields
2160
1744
  const reqObj = {
2161
1745
  payload: bodyVars,
2162
1746
  uriPathVars: pathVars,
2163
1747
  uriQuery: queryParams,
2164
- addlHeaders: thisHeaderData
1748
+ authData: {
1749
+ stsParams,
1750
+ roleName
1751
+ }
2165
1752
  };
2166
1753
 
2167
1754
  try {
2168
1755
  // Make the call -
2169
1756
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2170
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listHostedZones', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1757
+ return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZones', reqObj, true, (irReturnData, irReturnError) => {
2171
1758
  // if we received an error or their is no response on the results
2172
1759
  // return an error
2173
1760
  if (irReturnError) {
@@ -2231,7 +1818,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2231
1818
  const meth = 'adapter-createKeySigningKeySTSRole';
2232
1819
  const origin = `${this.id}-${meth}`;
2233
1820
  log.trace(origin);
2234
- const restVer = this.allProps.aws_ver;
2235
1821
 
2236
1822
  if (this.suspended && this.suspendMode === 'error') {
2237
1823
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2249,7 +1835,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2249
1835
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2250
1836
  const queryParamsAvailable = {};
2251
1837
  const queryParams = {};
2252
- const pathVars = [restVer];
1838
+ const pathVars = [];
2253
1839
  const bodyVars = body;
2254
1840
 
2255
1841
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2260,35 +1846,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2260
1846
  }
2261
1847
  });
2262
1848
 
2263
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2264
- let thisHeaderData = null;
2265
- // if the additional headers was passed in as a string parse the json into an object
2266
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2267
- try {
2268
- // parse the additional headers object that was passed in
2269
- thisHeaderData = JSON.parse(thisHeaderData);
2270
- } catch (err) {
2271
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2272
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2273
- return callback(null, errorObj);
2274
- }
2275
- } else if (thisHeaderData === null) {
2276
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
2277
- }
2278
-
2279
1849
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2280
1850
  // see adapter code documentation for more information on the request object's fields
2281
1851
  const reqObj = {
2282
1852
  payload: bodyVars,
2283
1853
  uriPathVars: pathVars,
2284
1854
  uriQuery: queryParams,
2285
- addlHeaders: thisHeaderData
1855
+ authData: {
1856
+ stsParams,
1857
+ roleName
1858
+ }
2286
1859
  };
2287
1860
 
2288
1861
  try {
2289
1862
  // Make the call -
2290
1863
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2291
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createKeySigningKey', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/keysigningkey?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1864
+ return this.requestHandlerInst.identifyRequest('Rest', 'createKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
2292
1865
  // if we received an error or their is no response on the results
2293
1866
  // return an error
2294
1867
  if (irReturnError) {
@@ -2352,7 +1925,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2352
1925
  const meth = 'adapter-createQueryLoggingConfigSTSRole';
2353
1926
  const origin = `${this.id}-${meth}`;
2354
1927
  log.trace(origin);
2355
- const restVer = this.allProps.aws_ver;
2356
1928
 
2357
1929
  if (this.suspended && this.suspendMode === 'error') {
2358
1930
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2370,7 +1942,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2370
1942
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2371
1943
  const queryParamsAvailable = {};
2372
1944
  const queryParams = {};
2373
- const pathVars = [restVer];
1945
+ const pathVars = [];
2374
1946
  const bodyVars = body;
2375
1947
 
2376
1948
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2381,35 +1953,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2381
1953
  }
2382
1954
  });
2383
1955
 
2384
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2385
- let thisHeaderData = null;
2386
- // if the additional headers was passed in as a string parse the json into an object
2387
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2388
- try {
2389
- // parse the additional headers object that was passed in
2390
- thisHeaderData = JSON.parse(thisHeaderData);
2391
- } catch (err) {
2392
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2393
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2394
- return callback(null, errorObj);
2395
- }
2396
- } else if (thisHeaderData === null) {
2397
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
2398
- }
2399
-
2400
1956
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2401
1957
  // see adapter code documentation for more information on the request object's fields
2402
1958
  const reqObj = {
2403
1959
  payload: bodyVars,
2404
1960
  uriPathVars: pathVars,
2405
1961
  uriQuery: queryParams,
2406
- addlHeaders: thisHeaderData
1962
+ authData: {
1963
+ stsParams,
1964
+ roleName
1965
+ }
2407
1966
  };
2408
1967
 
2409
1968
  try {
2410
1969
  // Make the call -
2411
1970
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2412
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createQueryLoggingConfig', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/queryloggingconfig?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
1971
+ return this.requestHandlerInst.identifyRequest('Rest', 'createQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
2413
1972
  // if we received an error or their is no response on the results
2414
1973
  // return an error
2415
1974
  if (irReturnError) {
@@ -2481,7 +2040,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2481
2040
  const meth = 'adapter-listQueryLoggingConfigsSTSRole';
2482
2041
  const origin = `${this.id}-${meth}`;
2483
2042
  log.trace(origin);
2484
- const restVer = this.allProps.aws_ver;
2485
2043
 
2486
2044
  if (this.suspended && this.suspendMode === 'error') {
2487
2045
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2494,7 +2052,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2494
2052
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2495
2053
  const queryParamsAvailable = { hostedzoneid, nexttoken, maxresults, maxResults, nextToken };
2496
2054
  const queryParams = {};
2497
- const pathVars = [restVer];
2055
+ const pathVars = [];
2498
2056
  const bodyVars = {};
2499
2057
 
2500
2058
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2505,35 +2063,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2505
2063
  }
2506
2064
  });
2507
2065
 
2508
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2509
- let thisHeaderData = null;
2510
- // if the additional headers was passed in as a string parse the json into an object
2511
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2512
- try {
2513
- // parse the additional headers object that was passed in
2514
- thisHeaderData = JSON.parse(thisHeaderData);
2515
- } catch (err) {
2516
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2517
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2518
- return callback(null, errorObj);
2519
- }
2520
- } else if (thisHeaderData === null) {
2521
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
2522
- }
2523
-
2524
2066
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2525
2067
  // see adapter code documentation for more information on the request object's fields
2526
2068
  const reqObj = {
2527
2069
  payload: bodyVars,
2528
2070
  uriPathVars: pathVars,
2529
2071
  uriQuery: queryParams,
2530
- addlHeaders: thisHeaderData
2072
+ authData: {
2073
+ stsParams,
2074
+ roleName
2075
+ }
2531
2076
  };
2532
2077
 
2533
2078
  try {
2534
2079
  // Make the call -
2535
2080
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2536
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listQueryLoggingConfigs', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/queryloggingconfig?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2081
+ return this.requestHandlerInst.identifyRequest('Rest', 'listQueryLoggingConfigs', reqObj, true, (irReturnData, irReturnError) => {
2537
2082
  // if we received an error or their is no response on the results
2538
2083
  // return an error
2539
2084
  if (irReturnError) {
@@ -2597,7 +2142,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2597
2142
  const meth = 'adapter-createReusableDelegationSetSTSRole';
2598
2143
  const origin = `${this.id}-${meth}`;
2599
2144
  log.trace(origin);
2600
- const restVer = this.allProps.aws_ver;
2601
2145
 
2602
2146
  if (this.suspended && this.suspendMode === 'error') {
2603
2147
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2615,7 +2159,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2615
2159
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2616
2160
  const queryParamsAvailable = {};
2617
2161
  const queryParams = {};
2618
- const pathVars = [restVer];
2162
+ const pathVars = [];
2619
2163
  const bodyVars = body;
2620
2164
 
2621
2165
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2626,35 +2170,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2626
2170
  }
2627
2171
  });
2628
2172
 
2629
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2630
- let thisHeaderData = null;
2631
- // if the additional headers was passed in as a string parse the json into an object
2632
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2633
- try {
2634
- // parse the additional headers object that was passed in
2635
- thisHeaderData = JSON.parse(thisHeaderData);
2636
- } catch (err) {
2637
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2638
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2639
- return callback(null, errorObj);
2640
- }
2641
- } else if (thisHeaderData === null) {
2642
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
2643
- }
2644
-
2645
2173
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2646
2174
  // see adapter code documentation for more information on the request object's fields
2647
2175
  const reqObj = {
2648
2176
  payload: bodyVars,
2649
2177
  uriPathVars: pathVars,
2650
2178
  uriQuery: queryParams,
2651
- addlHeaders: thisHeaderData
2179
+ authData: {
2180
+ stsParams,
2181
+ roleName
2182
+ }
2652
2183
  };
2653
2184
 
2654
2185
  try {
2655
2186
  // Make the call -
2656
2187
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2657
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createReusableDelegationSet', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/delegationset?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2188
+ return this.requestHandlerInst.identifyRequest('Rest', 'createReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
2658
2189
  // if we received an error or their is no response on the results
2659
2190
  // return an error
2660
2191
  if (irReturnError) {
@@ -2720,7 +2251,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2720
2251
  const meth = 'adapter-listReusableDelegationSetsSTSRole';
2721
2252
  const origin = `${this.id}-${meth}`;
2722
2253
  log.trace(origin);
2723
- const restVer = this.allProps.aws_ver;
2724
2254
 
2725
2255
  if (this.suspended && this.suspendMode === 'error') {
2726
2256
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2733,7 +2263,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2733
2263
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2734
2264
  const queryParamsAvailable = { marker, maxitems };
2735
2265
  const queryParams = {};
2736
- const pathVars = [restVer];
2266
+ const pathVars = [];
2737
2267
  const bodyVars = {};
2738
2268
 
2739
2269
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2744,35 +2274,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2744
2274
  }
2745
2275
  });
2746
2276
 
2747
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2748
- let thisHeaderData = null;
2749
- // if the additional headers was passed in as a string parse the json into an object
2750
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2751
- try {
2752
- // parse the additional headers object that was passed in
2753
- thisHeaderData = JSON.parse(thisHeaderData);
2754
- } catch (err) {
2755
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2756
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2757
- return callback(null, errorObj);
2758
- }
2759
- } else if (thisHeaderData === null) {
2760
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
2761
- }
2762
-
2763
2277
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2764
2278
  // see adapter code documentation for more information on the request object's fields
2765
2279
  const reqObj = {
2766
2280
  payload: bodyVars,
2767
2281
  uriPathVars: pathVars,
2768
2282
  uriQuery: queryParams,
2769
- addlHeaders: thisHeaderData
2283
+ authData: {
2284
+ stsParams,
2285
+ roleName
2286
+ }
2770
2287
  };
2771
2288
 
2772
2289
  try {
2773
2290
  // Make the call -
2774
2291
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2775
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listReusableDelegationSets', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/delegationset?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2292
+ return this.requestHandlerInst.identifyRequest('Rest', 'listReusableDelegationSets', reqObj, true, (irReturnData, irReturnError) => {
2776
2293
  // if we received an error or their is no response on the results
2777
2294
  // return an error
2778
2295
  if (irReturnError) {
@@ -2836,7 +2353,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2836
2353
  const meth = 'adapter-createTrafficPolicySTSRole';
2837
2354
  const origin = `${this.id}-${meth}`;
2838
2355
  log.trace(origin);
2839
- const restVer = this.allProps.aws_ver;
2840
2356
 
2841
2357
  if (this.suspended && this.suspendMode === 'error') {
2842
2358
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2854,7 +2370,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2854
2370
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2855
2371
  const queryParamsAvailable = {};
2856
2372
  const queryParams = {};
2857
- const pathVars = [restVer];
2373
+ const pathVars = [];
2858
2374
  const bodyVars = body;
2859
2375
 
2860
2376
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2865,35 +2381,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2865
2381
  }
2866
2382
  });
2867
2383
 
2868
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2869
- let thisHeaderData = null;
2870
- // if the additional headers was passed in as a string parse the json into an object
2871
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2872
- try {
2873
- // parse the additional headers object that was passed in
2874
- thisHeaderData = JSON.parse(thisHeaderData);
2875
- } catch (err) {
2876
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2877
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2878
- return callback(null, errorObj);
2879
- }
2880
- } else if (thisHeaderData === null) {
2881
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
2882
- }
2883
-
2884
2384
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
2885
2385
  // see adapter code documentation for more information on the request object's fields
2886
2386
  const reqObj = {
2887
2387
  payload: bodyVars,
2888
2388
  uriPathVars: pathVars,
2889
2389
  uriQuery: queryParams,
2890
- addlHeaders: thisHeaderData
2390
+ authData: {
2391
+ stsParams,
2392
+ roleName
2393
+ }
2891
2394
  };
2892
2395
 
2893
2396
  try {
2894
2397
  // Make the call -
2895
2398
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2896
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createTrafficPolicy', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicy?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2399
+ return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
2897
2400
  // if we received an error or their is no response on the results
2898
2401
  // return an error
2899
2402
  if (irReturnError) {
@@ -2957,7 +2460,6 @@ class AmazonRoute53 extends AdapterBaseCl {
2957
2460
  const meth = 'adapter-createTrafficPolicyInstanceSTSRole';
2958
2461
  const origin = `${this.id}-${meth}`;
2959
2462
  log.trace(origin);
2960
- const restVer = this.allProps.aws_ver;
2961
2463
 
2962
2464
  if (this.suspended && this.suspendMode === 'error') {
2963
2465
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -2975,7 +2477,7 @@ class AmazonRoute53 extends AdapterBaseCl {
2975
2477
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2976
2478
  const queryParamsAvailable = {};
2977
2479
  const queryParams = {};
2978
- const pathVars = [restVer];
2480
+ const pathVars = [];
2979
2481
  const bodyVars = body;
2980
2482
 
2981
2483
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -2986,35 +2488,22 @@ class AmazonRoute53 extends AdapterBaseCl {
2986
2488
  }
2987
2489
  });
2988
2490
 
2989
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
2990
- let thisHeaderData = null;
2991
- // if the additional headers was passed in as a string parse the json into an object
2992
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
2993
- try {
2994
- // parse the additional headers object that was passed in
2995
- thisHeaderData = JSON.parse(thisHeaderData);
2996
- } catch (err) {
2997
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
2998
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2999
- return callback(null, errorObj);
3000
- }
3001
- } else if (thisHeaderData === null) {
3002
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
3003
- }
3004
-
3005
2491
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3006
2492
  // see adapter code documentation for more information on the request object's fields
3007
2493
  const reqObj = {
3008
2494
  payload: bodyVars,
3009
2495
  uriPathVars: pathVars,
3010
2496
  uriQuery: queryParams,
3011
- addlHeaders: thisHeaderData
2497
+ authData: {
2498
+ stsParams,
2499
+ roleName
2500
+ }
3012
2501
  };
3013
2502
 
3014
2503
  try {
3015
2504
  // Make the call -
3016
2505
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3017
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createTrafficPolicyInstance', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstance?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2506
+ return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
3018
2507
  // if we received an error or their is no response on the results
3019
2508
  // return an error
3020
2509
  if (irReturnError) {
@@ -3080,7 +2569,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3080
2569
  const meth = 'adapter-createTrafficPolicyVersionSTSRole';
3081
2570
  const origin = `${this.id}-${meth}`;
3082
2571
  log.trace(origin);
3083
- const restVer = this.allProps.aws_ver;
3084
2572
 
3085
2573
  if (this.suspended && this.suspendMode === 'error') {
3086
2574
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3103,7 +2591,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3103
2591
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3104
2592
  const queryParamsAvailable = {};
3105
2593
  const queryParams = {};
3106
- const pathVars = [restVer, id];
2594
+ const pathVars = [id];
3107
2595
  const bodyVars = body;
3108
2596
 
3109
2597
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3114,35 +2602,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3114
2602
  }
3115
2603
  });
3116
2604
 
3117
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3118
- let thisHeaderData = null;
3119
- // if the additional headers was passed in as a string parse the json into an object
3120
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3121
- try {
3122
- // parse the additional headers object that was passed in
3123
- thisHeaderData = JSON.parse(thisHeaderData);
3124
- } catch (err) {
3125
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3126
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3127
- return callback(null, errorObj);
3128
- }
3129
- } else if (thisHeaderData === null) {
3130
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
3131
- }
3132
-
3133
2605
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3134
2606
  // see adapter code documentation for more information on the request object's fields
3135
2607
  const reqObj = {
3136
2608
  payload: bodyVars,
3137
2609
  uriPathVars: pathVars,
3138
2610
  uriQuery: queryParams,
3139
- addlHeaders: thisHeaderData
2611
+ authData: {
2612
+ stsParams,
2613
+ roleName
2614
+ }
3140
2615
  };
3141
2616
 
3142
2617
  try {
3143
2618
  // Make the call -
3144
2619
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3145
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createTrafficPolicyVersion', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicy/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2620
+ return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicyVersion', reqObj, true, (irReturnData, irReturnError) => {
3146
2621
  // if we received an error or their is no response on the results
3147
2622
  // return an error
3148
2623
  if (irReturnError) {
@@ -3208,7 +2683,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3208
2683
  const meth = 'adapter-createVPCAssociationAuthorizationSTSRole';
3209
2684
  const origin = `${this.id}-${meth}`;
3210
2685
  log.trace(origin);
3211
- const restVer = this.allProps.aws_ver;
3212
2686
 
3213
2687
  if (this.suspended && this.suspendMode === 'error') {
3214
2688
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3231,7 +2705,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3231
2705
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3232
2706
  const queryParamsAvailable = {};
3233
2707
  const queryParams = {};
3234
- const pathVars = [restVer, id];
2708
+ const pathVars = [id];
3235
2709
  const bodyVars = body;
3236
2710
 
3237
2711
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3242,35 +2716,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3242
2716
  }
3243
2717
  });
3244
2718
 
3245
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3246
- let thisHeaderData = null;
3247
- // if the additional headers was passed in as a string parse the json into an object
3248
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3249
- try {
3250
- // parse the additional headers object that was passed in
3251
- thisHeaderData = JSON.parse(thisHeaderData);
3252
- } catch (err) {
3253
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3254
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3255
- return callback(null, errorObj);
3256
- }
3257
- } else if (thisHeaderData === null) {
3258
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
3259
- }
3260
-
3261
2719
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3262
2720
  // see adapter code documentation for more information on the request object's fields
3263
2721
  const reqObj = {
3264
2722
  payload: bodyVars,
3265
2723
  uriPathVars: pathVars,
3266
2724
  uriQuery: queryParams,
3267
- addlHeaders: thisHeaderData
2725
+ authData: {
2726
+ stsParams,
2727
+ roleName
2728
+ }
3268
2729
  };
3269
2730
 
3270
2731
  try {
3271
2732
  // Make the call -
3272
2733
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3273
- return this.getAuthorizationAndIdentifyRequest('Rest', 'createVPCAssociationAuthorization', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/authorizevpcassociation?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2734
+ return this.requestHandlerInst.identifyRequest('Rest', 'createVPCAssociationAuthorization', reqObj, true, (irReturnData, irReturnError) => {
3274
2735
  // if we received an error or their is no response on the results
3275
2736
  // return an error
3276
2737
  if (irReturnError) {
@@ -3338,7 +2799,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3338
2799
  const meth = 'adapter-listVPCAssociationAuthorizationsSTSRole';
3339
2800
  const origin = `${this.id}-${meth}`;
3340
2801
  log.trace(origin);
3341
- const restVer = this.allProps.aws_ver;
3342
2802
 
3343
2803
  if (this.suspended && this.suspendMode === 'error') {
3344
2804
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3356,7 +2816,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3356
2816
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3357
2817
  const queryParamsAvailable = { nexttoken, maxresults };
3358
2818
  const queryParams = {};
3359
- const pathVars = [restVer, id];
2819
+ const pathVars = [id];
3360
2820
  const bodyVars = {};
3361
2821
 
3362
2822
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3367,35 +2827,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3367
2827
  }
3368
2828
  });
3369
2829
 
3370
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3371
- let thisHeaderData = null;
3372
- // if the additional headers was passed in as a string parse the json into an object
3373
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3374
- try {
3375
- // parse the additional headers object that was passed in
3376
- thisHeaderData = JSON.parse(thisHeaderData);
3377
- } catch (err) {
3378
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3379
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3380
- return callback(null, errorObj);
3381
- }
3382
- } else if (thisHeaderData === null) {
3383
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
3384
- }
3385
-
3386
2830
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3387
2831
  // see adapter code documentation for more information on the request object's fields
3388
2832
  const reqObj = {
3389
2833
  payload: bodyVars,
3390
2834
  uriPathVars: pathVars,
3391
2835
  uriQuery: queryParams,
3392
- addlHeaders: thisHeaderData
2836
+ authData: {
2837
+ stsParams,
2838
+ roleName
2839
+ }
3393
2840
  };
3394
2841
 
3395
2842
  try {
3396
2843
  // Make the call -
3397
2844
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3398
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listVPCAssociationAuthorizations', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/authorizevpcassociation?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2845
+ return this.requestHandlerInst.identifyRequest('Rest', 'listVPCAssociationAuthorizations', reqObj, true, (irReturnData, irReturnError) => {
3399
2846
  // if we received an error or their is no response on the results
3400
2847
  // return an error
3401
2848
  if (irReturnError) {
@@ -3461,7 +2908,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3461
2908
  const meth = 'adapter-deactivateKeySigningKeySTSRole';
3462
2909
  const origin = `${this.id}-${meth}`;
3463
2910
  log.trace(origin);
3464
- const restVer = this.allProps.aws_ver;
3465
2911
 
3466
2912
  if (this.suspended && this.suspendMode === 'error') {
3467
2913
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3484,7 +2930,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3484
2930
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3485
2931
  const queryParamsAvailable = {};
3486
2932
  const queryParams = {};
3487
- const pathVars = [restVer, hostedZoneId, name];
2933
+ const pathVars = [hostedZoneId, name];
3488
2934
  const bodyVars = '';
3489
2935
 
3490
2936
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3495,35 +2941,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3495
2941
  }
3496
2942
  });
3497
2943
 
3498
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3499
- let thisHeaderData = null;
3500
- // if the additional headers was passed in as a string parse the json into an object
3501
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3502
- try {
3503
- // parse the additional headers object that was passed in
3504
- thisHeaderData = JSON.parse(thisHeaderData);
3505
- } catch (err) {
3506
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3507
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3508
- return callback(null, errorObj);
3509
- }
3510
- } else if (thisHeaderData === null) {
3511
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
3512
- }
3513
-
3514
2944
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3515
2945
  // see adapter code documentation for more information on the request object's fields
3516
2946
  const reqObj = {
3517
2947
  payload: bodyVars,
3518
2948
  uriPathVars: pathVars,
3519
2949
  uriQuery: queryParams,
3520
- addlHeaders: thisHeaderData
2950
+ authData: {
2951
+ stsParams,
2952
+ roleName
2953
+ }
3521
2954
  };
3522
2955
 
3523
2956
  try {
3524
2957
  // Make the call -
3525
2958
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3526
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deactivateKeySigningKey', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/keysigningkey/${hostedZoneId}/${name}/deactivate?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
2959
+ return this.requestHandlerInst.identifyRequest('Rest', 'deactivateKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
3527
2960
  // if we received an error or their is no response on the results
3528
2961
  // return an error
3529
2962
  if (irReturnError) {
@@ -3587,7 +3020,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3587
3020
  const meth = 'adapter-deleteHealthCheckSTSRole';
3588
3021
  const origin = `${this.id}-${meth}`;
3589
3022
  log.trace(origin);
3590
- const restVer = this.allProps.aws_ver;
3591
3023
 
3592
3024
  if (this.suspended && this.suspendMode === 'error') {
3593
3025
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3605,7 +3037,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3605
3037
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3606
3038
  const queryParamsAvailable = {};
3607
3039
  const queryParams = {};
3608
- const pathVars = [restVer, healthCheckId];
3040
+ const pathVars = [healthCheckId];
3609
3041
  const bodyVars = {};
3610
3042
 
3611
3043
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3616,35 +3048,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3616
3048
  }
3617
3049
  });
3618
3050
 
3619
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3620
- let thisHeaderData = null;
3621
- // if the additional headers was passed in as a string parse the json into an object
3622
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3623
- try {
3624
- // parse the additional headers object that was passed in
3625
- thisHeaderData = JSON.parse(thisHeaderData);
3626
- } catch (err) {
3627
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3628
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3629
- return callback(null, errorObj);
3630
- }
3631
- } else if (thisHeaderData === null) {
3632
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
3633
- }
3634
-
3635
3051
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3636
3052
  // see adapter code documentation for more information on the request object's fields
3637
3053
  const reqObj = {
3638
3054
  payload: bodyVars,
3639
3055
  uriPathVars: pathVars,
3640
3056
  uriQuery: queryParams,
3641
- addlHeaders: thisHeaderData
3057
+ authData: {
3058
+ stsParams,
3059
+ roleName
3060
+ }
3642
3061
  };
3643
3062
 
3644
3063
  try {
3645
3064
  // Make the call -
3646
3065
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3647
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteHealthCheck', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck/${healthCheckId}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3066
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
3648
3067
  // if we received an error or their is no response on the results
3649
3068
  // return an error
3650
3069
  if (irReturnError) {
@@ -3708,7 +3127,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3708
3127
  const meth = 'adapter-getHealthCheckSTSRole';
3709
3128
  const origin = `${this.id}-${meth}`;
3710
3129
  log.trace(origin);
3711
- const restVer = this.allProps.aws_ver;
3712
3130
 
3713
3131
  if (this.suspended && this.suspendMode === 'error') {
3714
3132
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3726,7 +3144,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3726
3144
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3727
3145
  const queryParamsAvailable = {};
3728
3146
  const queryParams = {};
3729
- const pathVars = [restVer, healthCheckId];
3147
+ const pathVars = [healthCheckId];
3730
3148
  const bodyVars = {};
3731
3149
 
3732
3150
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3737,35 +3155,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3737
3155
  }
3738
3156
  });
3739
3157
 
3740
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3741
- let thisHeaderData = null;
3742
- // if the additional headers was passed in as a string parse the json into an object
3743
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3744
- try {
3745
- // parse the additional headers object that was passed in
3746
- thisHeaderData = JSON.parse(thisHeaderData);
3747
- } catch (err) {
3748
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3749
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3750
- return callback(null, errorObj);
3751
- }
3752
- } else if (thisHeaderData === null) {
3753
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
3754
- }
3755
-
3756
3158
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3757
3159
  // see adapter code documentation for more information on the request object's fields
3758
3160
  const reqObj = {
3759
3161
  payload: bodyVars,
3760
3162
  uriPathVars: pathVars,
3761
3163
  uriQuery: queryParams,
3762
- addlHeaders: thisHeaderData
3164
+ authData: {
3165
+ stsParams,
3166
+ roleName
3167
+ }
3763
3168
  };
3764
3169
 
3765
3170
  try {
3766
3171
  // Make the call -
3767
3172
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3768
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHealthCheck', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck/${healthCheckId}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3173
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
3769
3174
  // if we received an error or their is no response on the results
3770
3175
  // return an error
3771
3176
  if (irReturnError) {
@@ -3831,7 +3236,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3831
3236
  const meth = 'adapter-updateHealthCheckSTSRole';
3832
3237
  const origin = `${this.id}-${meth}`;
3833
3238
  log.trace(origin);
3834
- const restVer = this.allProps.aws_ver;
3835
3239
 
3836
3240
  if (this.suspended && this.suspendMode === 'error') {
3837
3241
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3854,7 +3258,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3854
3258
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3855
3259
  const queryParamsAvailable = {};
3856
3260
  const queryParams = {};
3857
- const pathVars = [restVer, healthCheckId];
3261
+ const pathVars = [healthCheckId];
3858
3262
  const bodyVars = body;
3859
3263
 
3860
3264
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3865,35 +3269,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3865
3269
  }
3866
3270
  });
3867
3271
 
3868
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3869
- let thisHeaderData = null;
3870
- // if the additional headers was passed in as a string parse the json into an object
3871
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3872
- try {
3873
- // parse the additional headers object that was passed in
3874
- thisHeaderData = JSON.parse(thisHeaderData);
3875
- } catch (err) {
3876
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3877
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3878
- return callback(null, errorObj);
3879
- }
3880
- } else if (thisHeaderData === null) {
3881
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
3882
- }
3883
-
3884
3272
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
3885
3273
  // see adapter code documentation for more information on the request object's fields
3886
3274
  const reqObj = {
3887
3275
  payload: bodyVars,
3888
3276
  uriPathVars: pathVars,
3889
3277
  uriQuery: queryParams,
3890
- addlHeaders: thisHeaderData
3278
+ authData: {
3279
+ stsParams,
3280
+ roleName
3281
+ }
3891
3282
  };
3892
3283
 
3893
3284
  try {
3894
3285
  // Make the call -
3895
3286
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
3896
- return this.getAuthorizationAndIdentifyRequest('Rest', 'updateHealthCheck', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck/${healthCheckId}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3287
+ return this.requestHandlerInst.identifyRequest('Rest', 'updateHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
3897
3288
  // if we received an error or their is no response on the results
3898
3289
  // return an error
3899
3290
  if (irReturnError) {
@@ -3957,7 +3348,6 @@ class AmazonRoute53 extends AdapterBaseCl {
3957
3348
  const meth = 'adapter-deleteHostedZoneSTSRole';
3958
3349
  const origin = `${this.id}-${meth}`;
3959
3350
  log.trace(origin);
3960
- const restVer = this.allProps.aws_ver;
3961
3351
 
3962
3352
  if (this.suspended && this.suspendMode === 'error') {
3963
3353
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -3975,7 +3365,7 @@ class AmazonRoute53 extends AdapterBaseCl {
3975
3365
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
3976
3366
  const queryParamsAvailable = {};
3977
3367
  const queryParams = {};
3978
- const pathVars = [restVer, id];
3368
+ const pathVars = [id];
3979
3369
  const bodyVars = {};
3980
3370
 
3981
3371
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -3986,35 +3376,22 @@ class AmazonRoute53 extends AdapterBaseCl {
3986
3376
  }
3987
3377
  });
3988
3378
 
3989
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
3990
- let thisHeaderData = null;
3991
- // if the additional headers was passed in as a string parse the json into an object
3992
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
3993
- try {
3994
- // parse the additional headers object that was passed in
3995
- thisHeaderData = JSON.parse(thisHeaderData);
3996
- } catch (err) {
3997
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
3998
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3999
- return callback(null, errorObj);
4000
- }
4001
- } else if (thisHeaderData === null) {
4002
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4003
- }
4004
-
4005
3379
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4006
3380
  // see adapter code documentation for more information on the request object's fields
4007
3381
  const reqObj = {
4008
3382
  payload: bodyVars,
4009
3383
  uriPathVars: pathVars,
4010
3384
  uriQuery: queryParams,
4011
- addlHeaders: thisHeaderData
3385
+ authData: {
3386
+ stsParams,
3387
+ roleName
3388
+ }
4012
3389
  };
4013
3390
 
4014
3391
  try {
4015
3392
  // Make the call -
4016
3393
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4017
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3394
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteHostedZone', reqObj, true, (irReturnData, irReturnError) => {
4018
3395
  // if we received an error or their is no response on the results
4019
3396
  // return an error
4020
3397
  if (irReturnError) {
@@ -4078,7 +3455,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4078
3455
  const meth = 'adapter-getHostedZoneSTSRole';
4079
3456
  const origin = `${this.id}-${meth}`;
4080
3457
  log.trace(origin);
4081
- const restVer = this.allProps.aws_ver;
4082
3458
 
4083
3459
  if (this.suspended && this.suspendMode === 'error') {
4084
3460
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4096,7 +3472,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4096
3472
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4097
3473
  const queryParamsAvailable = {};
4098
3474
  const queryParams = {};
4099
- const pathVars = [restVer, id];
3475
+ const pathVars = [id];
4100
3476
  const bodyVars = {};
4101
3477
 
4102
3478
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4107,35 +3483,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4107
3483
  }
4108
3484
  });
4109
3485
 
4110
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4111
- let thisHeaderData = null;
4112
- // if the additional headers was passed in as a string parse the json into an object
4113
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4114
- try {
4115
- // parse the additional headers object that was passed in
4116
- thisHeaderData = JSON.parse(thisHeaderData);
4117
- } catch (err) {
4118
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4119
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4120
- return callback(null, errorObj);
4121
- }
4122
- } else if (thisHeaderData === null) {
4123
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4124
- }
4125
-
4126
3486
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4127
3487
  // see adapter code documentation for more information on the request object's fields
4128
3488
  const reqObj = {
4129
3489
  payload: bodyVars,
4130
3490
  uriPathVars: pathVars,
4131
3491
  uriQuery: queryParams,
4132
- addlHeaders: thisHeaderData
3492
+ authData: {
3493
+ stsParams,
3494
+ roleName
3495
+ }
4133
3496
  };
4134
3497
 
4135
3498
  try {
4136
3499
  // Make the call -
4137
3500
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4138
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3501
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZone', reqObj, true, (irReturnData, irReturnError) => {
4139
3502
  // if we received an error or their is no response on the results
4140
3503
  // return an error
4141
3504
  if (irReturnError) {
@@ -4201,7 +3564,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4201
3564
  const meth = 'adapter-updateHostedZoneCommentSTSRole';
4202
3565
  const origin = `${this.id}-${meth}`;
4203
3566
  log.trace(origin);
4204
- const restVer = this.allProps.aws_ver;
4205
3567
 
4206
3568
  if (this.suspended && this.suspendMode === 'error') {
4207
3569
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4224,7 +3586,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4224
3586
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4225
3587
  const queryParamsAvailable = {};
4226
3588
  const queryParams = {};
4227
- const pathVars = [restVer, id];
3589
+ const pathVars = [id];
4228
3590
  const bodyVars = body;
4229
3591
 
4230
3592
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4235,35 +3597,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4235
3597
  }
4236
3598
  });
4237
3599
 
4238
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4239
- let thisHeaderData = null;
4240
- // if the additional headers was passed in as a string parse the json into an object
4241
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4242
- try {
4243
- // parse the additional headers object that was passed in
4244
- thisHeaderData = JSON.parse(thisHeaderData);
4245
- } catch (err) {
4246
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4247
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4248
- return callback(null, errorObj);
4249
- }
4250
- } else if (thisHeaderData === null) {
4251
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
4252
- }
4253
-
4254
3600
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4255
3601
  // see adapter code documentation for more information on the request object's fields
4256
3602
  const reqObj = {
4257
3603
  payload: bodyVars,
4258
3604
  uriPathVars: pathVars,
4259
3605
  uriQuery: queryParams,
4260
- addlHeaders: thisHeaderData
3606
+ authData: {
3607
+ stsParams,
3608
+ roleName
3609
+ }
4261
3610
  };
4262
3611
 
4263
3612
  try {
4264
3613
  // Make the call -
4265
3614
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4266
- return this.getAuthorizationAndIdentifyRequest('Rest', 'updateHostedZoneComment', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3615
+ return this.requestHandlerInst.identifyRequest('Rest', 'updateHostedZoneComment', reqObj, true, (irReturnData, irReturnError) => {
4267
3616
  // if we received an error or their is no response on the results
4268
3617
  // return an error
4269
3618
  if (irReturnError) {
@@ -4329,7 +3678,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4329
3678
  const meth = 'adapter-deleteKeySigningKeySTSRole';
4330
3679
  const origin = `${this.id}-${meth}`;
4331
3680
  log.trace(origin);
4332
- const restVer = this.allProps.aws_ver;
4333
3681
 
4334
3682
  if (this.suspended && this.suspendMode === 'error') {
4335
3683
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4352,7 +3700,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4352
3700
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4353
3701
  const queryParamsAvailable = {};
4354
3702
  const queryParams = {};
4355
- const pathVars = [restVer, hostedZoneId, name];
3703
+ const pathVars = [hostedZoneId, name];
4356
3704
  const bodyVars = {};
4357
3705
 
4358
3706
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4363,35 +3711,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4363
3711
  }
4364
3712
  });
4365
3713
 
4366
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4367
- let thisHeaderData = null;
4368
- // if the additional headers was passed in as a string parse the json into an object
4369
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4370
- try {
4371
- // parse the additional headers object that was passed in
4372
- thisHeaderData = JSON.parse(thisHeaderData);
4373
- } catch (err) {
4374
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4375
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4376
- return callback(null, errorObj);
4377
- }
4378
- } else if (thisHeaderData === null) {
4379
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4380
- }
4381
-
4382
3714
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4383
3715
  // see adapter code documentation for more information on the request object's fields
4384
3716
  const reqObj = {
4385
3717
  payload: bodyVars,
4386
3718
  uriPathVars: pathVars,
4387
3719
  uriQuery: queryParams,
4388
- addlHeaders: thisHeaderData
3720
+ authData: {
3721
+ stsParams,
3722
+ roleName
3723
+ }
4389
3724
  };
4390
3725
 
4391
3726
  try {
4392
3727
  // Make the call -
4393
3728
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4394
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteKeySigningKey', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/keysigningkey/${hostedZoneId}/${name}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3729
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
4395
3730
  // if we received an error or their is no response on the results
4396
3731
  // return an error
4397
3732
  if (irReturnError) {
@@ -4455,7 +3790,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4455
3790
  const meth = 'adapter-deleteQueryLoggingConfigSTSRole';
4456
3791
  const origin = `${this.id}-${meth}`;
4457
3792
  log.trace(origin);
4458
- const restVer = this.allProps.aws_ver;
4459
3793
 
4460
3794
  if (this.suspended && this.suspendMode === 'error') {
4461
3795
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4473,7 +3807,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4473
3807
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4474
3808
  const queryParamsAvailable = {};
4475
3809
  const queryParams = {};
4476
- const pathVars = [restVer, id];
3810
+ const pathVars = [id];
4477
3811
  const bodyVars = {};
4478
3812
 
4479
3813
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4484,35 +3818,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4484
3818
  }
4485
3819
  });
4486
3820
 
4487
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4488
- let thisHeaderData = null;
4489
- // if the additional headers was passed in as a string parse the json into an object
4490
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4491
- try {
4492
- // parse the additional headers object that was passed in
4493
- thisHeaderData = JSON.parse(thisHeaderData);
4494
- } catch (err) {
4495
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4496
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4497
- return callback(null, errorObj);
4498
- }
4499
- } else if (thisHeaderData === null) {
4500
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4501
- }
4502
-
4503
3821
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4504
3822
  // see adapter code documentation for more information on the request object's fields
4505
3823
  const reqObj = {
4506
3824
  payload: bodyVars,
4507
3825
  uriPathVars: pathVars,
4508
3826
  uriQuery: queryParams,
4509
- addlHeaders: thisHeaderData
3827
+ authData: {
3828
+ stsParams,
3829
+ roleName
3830
+ }
4510
3831
  };
4511
3832
 
4512
3833
  try {
4513
3834
  // Make the call -
4514
3835
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4515
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteQueryLoggingConfig', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/queryloggingconfig/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3836
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
4516
3837
  // if we received an error or their is no response on the results
4517
3838
  // return an error
4518
3839
  if (irReturnError) {
@@ -4576,7 +3897,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4576
3897
  const meth = 'adapter-getQueryLoggingConfigSTSRole';
4577
3898
  const origin = `${this.id}-${meth}`;
4578
3899
  log.trace(origin);
4579
- const restVer = this.allProps.aws_ver;
4580
3900
 
4581
3901
  if (this.suspended && this.suspendMode === 'error') {
4582
3902
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4594,7 +3914,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4594
3914
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4595
3915
  const queryParamsAvailable = {};
4596
3916
  const queryParams = {};
4597
- const pathVars = [restVer, id];
3917
+ const pathVars = [id];
4598
3918
  const bodyVars = {};
4599
3919
 
4600
3920
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4605,35 +3925,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4605
3925
  }
4606
3926
  });
4607
3927
 
4608
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4609
- let thisHeaderData = null;
4610
- // if the additional headers was passed in as a string parse the json into an object
4611
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4612
- try {
4613
- // parse the additional headers object that was passed in
4614
- thisHeaderData = JSON.parse(thisHeaderData);
4615
- } catch (err) {
4616
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4617
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4618
- return callback(null, errorObj);
4619
- }
4620
- } else if (thisHeaderData === null) {
4621
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4622
- }
4623
-
4624
3928
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4625
3929
  // see adapter code documentation for more information on the request object's fields
4626
3930
  const reqObj = {
4627
3931
  payload: bodyVars,
4628
3932
  uriPathVars: pathVars,
4629
3933
  uriQuery: queryParams,
4630
- addlHeaders: thisHeaderData
3934
+ authData: {
3935
+ stsParams,
3936
+ roleName
3937
+ }
4631
3938
  };
4632
3939
 
4633
3940
  try {
4634
3941
  // Make the call -
4635
3942
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4636
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getQueryLoggingConfig', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/queryloggingconfig/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
3943
+ return this.requestHandlerInst.identifyRequest('Rest', 'getQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
4637
3944
  // if we received an error or their is no response on the results
4638
3945
  // return an error
4639
3946
  if (irReturnError) {
@@ -4697,7 +4004,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4697
4004
  const meth = 'adapter-deleteReusableDelegationSetSTSRole';
4698
4005
  const origin = `${this.id}-${meth}`;
4699
4006
  log.trace(origin);
4700
- const restVer = this.allProps.aws_ver;
4701
4007
 
4702
4008
  if (this.suspended && this.suspendMode === 'error') {
4703
4009
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4715,7 +4021,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4715
4021
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4716
4022
  const queryParamsAvailable = {};
4717
4023
  const queryParams = {};
4718
- const pathVars = [restVer, id];
4024
+ const pathVars = [id];
4719
4025
  const bodyVars = {};
4720
4026
 
4721
4027
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4726,35 +4032,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4726
4032
  }
4727
4033
  });
4728
4034
 
4729
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4730
- let thisHeaderData = null;
4731
- // if the additional headers was passed in as a string parse the json into an object
4732
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4733
- try {
4734
- // parse the additional headers object that was passed in
4735
- thisHeaderData = JSON.parse(thisHeaderData);
4736
- } catch (err) {
4737
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4738
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4739
- return callback(null, errorObj);
4740
- }
4741
- } else if (thisHeaderData === null) {
4742
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4743
- }
4744
-
4745
4035
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4746
4036
  // see adapter code documentation for more information on the request object's fields
4747
4037
  const reqObj = {
4748
4038
  payload: bodyVars,
4749
4039
  uriPathVars: pathVars,
4750
4040
  uriQuery: queryParams,
4751
- addlHeaders: thisHeaderData
4041
+ authData: {
4042
+ stsParams,
4043
+ roleName
4044
+ }
4752
4045
  };
4753
4046
 
4754
4047
  try {
4755
4048
  // Make the call -
4756
4049
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4757
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteReusableDelegationSet', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/delegationset/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4050
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
4758
4051
  // if we received an error or their is no response on the results
4759
4052
  // return an error
4760
4053
  if (irReturnError) {
@@ -4818,7 +4111,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4818
4111
  const meth = 'adapter-getReusableDelegationSetSTSRole';
4819
4112
  const origin = `${this.id}-${meth}`;
4820
4113
  log.trace(origin);
4821
- const restVer = this.allProps.aws_ver;
4822
4114
 
4823
4115
  if (this.suspended && this.suspendMode === 'error') {
4824
4116
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4836,7 +4128,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4836
4128
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4837
4129
  const queryParamsAvailable = {};
4838
4130
  const queryParams = {};
4839
- const pathVars = [restVer, id];
4131
+ const pathVars = [id];
4840
4132
  const bodyVars = {};
4841
4133
 
4842
4134
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4847,35 +4139,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4847
4139
  }
4848
4140
  });
4849
4141
 
4850
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4851
- let thisHeaderData = null;
4852
- // if the additional headers was passed in as a string parse the json into an object
4853
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4854
- try {
4855
- // parse the additional headers object that was passed in
4856
- thisHeaderData = JSON.parse(thisHeaderData);
4857
- } catch (err) {
4858
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4859
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4860
- return callback(null, errorObj);
4861
- }
4862
- } else if (thisHeaderData === null) {
4863
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4864
- }
4865
-
4866
4142
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4867
4143
  // see adapter code documentation for more information on the request object's fields
4868
4144
  const reqObj = {
4869
4145
  payload: bodyVars,
4870
4146
  uriPathVars: pathVars,
4871
4147
  uriQuery: queryParams,
4872
- addlHeaders: thisHeaderData
4148
+ authData: {
4149
+ stsParams,
4150
+ roleName
4151
+ }
4873
4152
  };
4874
4153
 
4875
4154
  try {
4876
4155
  // Make the call -
4877
4156
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
4878
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getReusableDelegationSet', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/delegationset/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4157
+ return this.requestHandlerInst.identifyRequest('Rest', 'getReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
4879
4158
  // if we received an error or their is no response on the results
4880
4159
  // return an error
4881
4160
  if (irReturnError) {
@@ -4941,7 +4220,6 @@ class AmazonRoute53 extends AdapterBaseCl {
4941
4220
  const meth = 'adapter-deleteTrafficPolicySTSRole';
4942
4221
  const origin = `${this.id}-${meth}`;
4943
4222
  log.trace(origin);
4944
- const restVer = this.allProps.aws_ver;
4945
4223
 
4946
4224
  if (this.suspended && this.suspendMode === 'error') {
4947
4225
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -4964,7 +4242,7 @@ class AmazonRoute53 extends AdapterBaseCl {
4964
4242
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
4965
4243
  const queryParamsAvailable = {};
4966
4244
  const queryParams = {};
4967
- const pathVars = [restVer, id, version];
4245
+ const pathVars = [id, version];
4968
4246
  const bodyVars = {};
4969
4247
 
4970
4248
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -4975,35 +4253,22 @@ class AmazonRoute53 extends AdapterBaseCl {
4975
4253
  }
4976
4254
  });
4977
4255
 
4978
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
4979
- let thisHeaderData = null;
4980
- // if the additional headers was passed in as a string parse the json into an object
4981
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
4982
- try {
4983
- // parse the additional headers object that was passed in
4984
- thisHeaderData = JSON.parse(thisHeaderData);
4985
- } catch (err) {
4986
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
4987
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4988
- return callback(null, errorObj);
4989
- }
4990
- } else if (thisHeaderData === null) {
4991
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
4992
- }
4993
-
4994
4256
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
4995
4257
  // see adapter code documentation for more information on the request object's fields
4996
4258
  const reqObj = {
4997
4259
  payload: bodyVars,
4998
4260
  uriPathVars: pathVars,
4999
4261
  uriQuery: queryParams,
5000
- addlHeaders: thisHeaderData
4262
+ authData: {
4263
+ stsParams,
4264
+ roleName
4265
+ }
5001
4266
  };
5002
4267
 
5003
4268
  try {
5004
4269
  // Make the call -
5005
4270
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5006
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteTrafficPolicy', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicy/${id}/${version}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4271
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
5007
4272
  // if we received an error or their is no response on the results
5008
4273
  // return an error
5009
4274
  if (irReturnError) {
@@ -5069,7 +4334,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5069
4334
  const meth = 'adapter-getTrafficPolicySTSRole';
5070
4335
  const origin = `${this.id}-${meth}`;
5071
4336
  log.trace(origin);
5072
- const restVer = this.allProps.aws_ver;
5073
4337
 
5074
4338
  if (this.suspended && this.suspendMode === 'error') {
5075
4339
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5092,7 +4356,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5092
4356
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5093
4357
  const queryParamsAvailable = {};
5094
4358
  const queryParams = {};
5095
- const pathVars = [restVer, id, version];
4359
+ const pathVars = [id, version];
5096
4360
  const bodyVars = {};
5097
4361
 
5098
4362
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5103,35 +4367,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5103
4367
  }
5104
4368
  });
5105
4369
 
5106
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5107
- let thisHeaderData = null;
5108
- // if the additional headers was passed in as a string parse the json into an object
5109
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5110
- try {
5111
- // parse the additional headers object that was passed in
5112
- thisHeaderData = JSON.parse(thisHeaderData);
5113
- } catch (err) {
5114
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5115
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5116
- return callback(null, errorObj);
5117
- }
5118
- } else if (thisHeaderData === null) {
5119
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
5120
- }
5121
-
5122
4370
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5123
4371
  // see adapter code documentation for more information on the request object's fields
5124
4372
  const reqObj = {
5125
4373
  payload: bodyVars,
5126
4374
  uriPathVars: pathVars,
5127
4375
  uriQuery: queryParams,
5128
- addlHeaders: thisHeaderData
4376
+ authData: {
4377
+ stsParams,
4378
+ roleName
4379
+ }
5129
4380
  };
5130
4381
 
5131
4382
  try {
5132
4383
  // Make the call -
5133
4384
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5134
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getTrafficPolicy', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicy/${id}/${version}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4385
+ return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
5135
4386
  // if we received an error or their is no response on the results
5136
4387
  // return an error
5137
4388
  if (irReturnError) {
@@ -5199,7 +4450,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5199
4450
  const meth = 'adapter-updateTrafficPolicyCommentSTSRole';
5200
4451
  const origin = `${this.id}-${meth}`;
5201
4452
  log.trace(origin);
5202
- const restVer = this.allProps.aws_ver;
5203
4453
 
5204
4454
  if (this.suspended && this.suspendMode === 'error') {
5205
4455
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5227,7 +4477,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5227
4477
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5228
4478
  const queryParamsAvailable = {};
5229
4479
  const queryParams = {};
5230
- const pathVars = [restVer, id, version];
4480
+ const pathVars = [id, version];
5231
4481
  const bodyVars = body;
5232
4482
 
5233
4483
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5238,35 +4488,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5238
4488
  }
5239
4489
  });
5240
4490
 
5241
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5242
- let thisHeaderData = null;
5243
- // if the additional headers was passed in as a string parse the json into an object
5244
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5245
- try {
5246
- // parse the additional headers object that was passed in
5247
- thisHeaderData = JSON.parse(thisHeaderData);
5248
- } catch (err) {
5249
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5250
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5251
- return callback(null, errorObj);
5252
- }
5253
- } else if (thisHeaderData === null) {
5254
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
5255
- }
5256
-
5257
4491
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5258
4492
  // see adapter code documentation for more information on the request object's fields
5259
4493
  const reqObj = {
5260
4494
  payload: bodyVars,
5261
4495
  uriPathVars: pathVars,
5262
4496
  uriQuery: queryParams,
5263
- addlHeaders: thisHeaderData
4497
+ authData: {
4498
+ stsParams,
4499
+ roleName
4500
+ }
5264
4501
  };
5265
4502
 
5266
4503
  try {
5267
4504
  // Make the call -
5268
4505
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5269
- return this.getAuthorizationAndIdentifyRequest('Rest', 'updateTrafficPolicyComment', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicy/${id}/${version}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4506
+ return this.requestHandlerInst.identifyRequest('Rest', 'updateTrafficPolicyComment', reqObj, true, (irReturnData, irReturnError) => {
5270
4507
  // if we received an error or their is no response on the results
5271
4508
  // return an error
5272
4509
  if (irReturnError) {
@@ -5330,7 +4567,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5330
4567
  const meth = 'adapter-deleteTrafficPolicyInstanceSTSRole';
5331
4568
  const origin = `${this.id}-${meth}`;
5332
4569
  log.trace(origin);
5333
- const restVer = this.allProps.aws_ver;
5334
4570
 
5335
4571
  if (this.suspended && this.suspendMode === 'error') {
5336
4572
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5348,7 +4584,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5348
4584
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5349
4585
  const queryParamsAvailable = {};
5350
4586
  const queryParams = {};
5351
- const pathVars = [restVer, id];
4587
+ const pathVars = [id];
5352
4588
  const bodyVars = {};
5353
4589
 
5354
4590
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5359,35 +4595,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5359
4595
  }
5360
4596
  });
5361
4597
 
5362
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5363
- let thisHeaderData = null;
5364
- // if the additional headers was passed in as a string parse the json into an object
5365
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5366
- try {
5367
- // parse the additional headers object that was passed in
5368
- thisHeaderData = JSON.parse(thisHeaderData);
5369
- } catch (err) {
5370
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5371
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5372
- return callback(null, errorObj);
5373
- }
5374
- } else if (thisHeaderData === null) {
5375
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
5376
- }
5377
-
5378
4598
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5379
4599
  // see adapter code documentation for more information on the request object's fields
5380
4600
  const reqObj = {
5381
4601
  payload: bodyVars,
5382
4602
  uriPathVars: pathVars,
5383
4603
  uriQuery: queryParams,
5384
- addlHeaders: thisHeaderData
4604
+ authData: {
4605
+ stsParams,
4606
+ roleName
4607
+ }
5385
4608
  };
5386
4609
 
5387
4610
  try {
5388
4611
  // Make the call -
5389
4612
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5390
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteTrafficPolicyInstance', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstance/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4613
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
5391
4614
  // if we received an error or their is no response on the results
5392
4615
  // return an error
5393
4616
  if (irReturnError) {
@@ -5451,7 +4674,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5451
4674
  const meth = 'adapter-getTrafficPolicyInstanceSTSRole';
5452
4675
  const origin = `${this.id}-${meth}`;
5453
4676
  log.trace(origin);
5454
- const restVer = this.allProps.aws_ver;
5455
4677
 
5456
4678
  if (this.suspended && this.suspendMode === 'error') {
5457
4679
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5469,7 +4691,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5469
4691
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5470
4692
  const queryParamsAvailable = {};
5471
4693
  const queryParams = {};
5472
- const pathVars = [restVer, id];
4694
+ const pathVars = [id];
5473
4695
  const bodyVars = {};
5474
4696
 
5475
4697
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5480,35 +4702,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5480
4702
  }
5481
4703
  });
5482
4704
 
5483
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5484
- let thisHeaderData = null;
5485
- // if the additional headers was passed in as a string parse the json into an object
5486
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5487
- try {
5488
- // parse the additional headers object that was passed in
5489
- thisHeaderData = JSON.parse(thisHeaderData);
5490
- } catch (err) {
5491
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5492
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5493
- return callback(null, errorObj);
5494
- }
5495
- } else if (thisHeaderData === null) {
5496
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
5497
- }
5498
-
5499
4705
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5500
4706
  // see adapter code documentation for more information on the request object's fields
5501
4707
  const reqObj = {
5502
4708
  payload: bodyVars,
5503
4709
  uriPathVars: pathVars,
5504
4710
  uriQuery: queryParams,
5505
- addlHeaders: thisHeaderData
4711
+ authData: {
4712
+ stsParams,
4713
+ roleName
4714
+ }
5506
4715
  };
5507
4716
 
5508
4717
  try {
5509
4718
  // Make the call -
5510
4719
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5511
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getTrafficPolicyInstance', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstance/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4720
+ return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
5512
4721
  // if we received an error or their is no response on the results
5513
4722
  // return an error
5514
4723
  if (irReturnError) {
@@ -5574,7 +4783,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5574
4783
  const meth = 'adapter-updateTrafficPolicyInstanceSTSRole';
5575
4784
  const origin = `${this.id}-${meth}`;
5576
4785
  log.trace(origin);
5577
- const restVer = this.allProps.aws_ver;
5578
4786
 
5579
4787
  if (this.suspended && this.suspendMode === 'error') {
5580
4788
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5597,7 +4805,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5597
4805
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5598
4806
  const queryParamsAvailable = {};
5599
4807
  const queryParams = {};
5600
- const pathVars = [restVer, id];
4808
+ const pathVars = [id];
5601
4809
  const bodyVars = body;
5602
4810
 
5603
4811
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5608,35 +4816,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5608
4816
  }
5609
4817
  });
5610
4818
 
5611
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5612
- let thisHeaderData = null;
5613
- // if the additional headers was passed in as a string parse the json into an object
5614
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5615
- try {
5616
- // parse the additional headers object that was passed in
5617
- thisHeaderData = JSON.parse(thisHeaderData);
5618
- } catch (err) {
5619
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5620
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5621
- return callback(null, errorObj);
5622
- }
5623
- } else if (thisHeaderData === null) {
5624
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
5625
- }
5626
-
5627
4819
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5628
4820
  // see adapter code documentation for more information on the request object's fields
5629
4821
  const reqObj = {
5630
4822
  payload: bodyVars,
5631
4823
  uriPathVars: pathVars,
5632
4824
  uriQuery: queryParams,
5633
- addlHeaders: thisHeaderData
4825
+ authData: {
4826
+ stsParams,
4827
+ roleName
4828
+ }
5634
4829
  };
5635
4830
 
5636
4831
  try {
5637
4832
  // Make the call -
5638
4833
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5639
- return this.getAuthorizationAndIdentifyRequest('Rest', 'updateTrafficPolicyInstance', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstance/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4834
+ return this.requestHandlerInst.identifyRequest('Rest', 'updateTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
5640
4835
  // if we received an error or their is no response on the results
5641
4836
  // return an error
5642
4837
  if (irReturnError) {
@@ -5702,7 +4897,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5702
4897
  const meth = 'adapter-deleteVPCAssociationAuthorizationSTSRole';
5703
4898
  const origin = `${this.id}-${meth}`;
5704
4899
  log.trace(origin);
5705
- const restVer = this.allProps.aws_ver;
5706
4900
 
5707
4901
  if (this.suspended && this.suspendMode === 'error') {
5708
4902
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5725,7 +4919,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5725
4919
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5726
4920
  const queryParamsAvailable = {};
5727
4921
  const queryParams = {};
5728
- const pathVars = [restVer, id];
4922
+ const pathVars = [id];
5729
4923
  const bodyVars = body;
5730
4924
 
5731
4925
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5736,35 +4930,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5736
4930
  }
5737
4931
  });
5738
4932
 
5739
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5740
- let thisHeaderData = null;
5741
- // if the additional headers was passed in as a string parse the json into an object
5742
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5743
- try {
5744
- // parse the additional headers object that was passed in
5745
- thisHeaderData = JSON.parse(thisHeaderData);
5746
- } catch (err) {
5747
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5748
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5749
- return callback(null, errorObj);
5750
- }
5751
- } else if (thisHeaderData === null) {
5752
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
5753
- }
5754
-
5755
4933
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5756
4934
  // see adapter code documentation for more information on the request object's fields
5757
4935
  const reqObj = {
5758
4936
  payload: bodyVars,
5759
4937
  uriPathVars: pathVars,
5760
4938
  uriQuery: queryParams,
5761
- addlHeaders: thisHeaderData
4939
+ authData: {
4940
+ stsParams,
4941
+ roleName
4942
+ }
5762
4943
  };
5763
4944
 
5764
4945
  try {
5765
4946
  // Make the call -
5766
4947
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5767
- return this.getAuthorizationAndIdentifyRequest('Rest', 'deleteVPCAssociationAuthorization', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/deauthorizevpcassociation?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
4948
+ return this.requestHandlerInst.identifyRequest('Rest', 'deleteVPCAssociationAuthorization', reqObj, true, (irReturnData, irReturnError) => {
5768
4949
  // if we received an error or their is no response on the results
5769
4950
  // return an error
5770
4951
  if (irReturnError) {
@@ -5828,7 +5009,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5828
5009
  const meth = 'adapter-disableHostedZoneDNSSECSTSRole';
5829
5010
  const origin = `${this.id}-${meth}`;
5830
5011
  log.trace(origin);
5831
- const restVer = this.allProps.aws_ver;
5832
5012
 
5833
5013
  if (this.suspended && this.suspendMode === 'error') {
5834
5014
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5846,7 +5026,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5846
5026
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5847
5027
  const queryParamsAvailable = {};
5848
5028
  const queryParams = {};
5849
- const pathVars = [restVer, id];
5029
+ const pathVars = [id];
5850
5030
  const bodyVars = '';
5851
5031
 
5852
5032
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5857,35 +5037,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5857
5037
  }
5858
5038
  });
5859
5039
 
5860
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5861
- let thisHeaderData = null;
5862
- // if the additional headers was passed in as a string parse the json into an object
5863
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5864
- try {
5865
- // parse the additional headers object that was passed in
5866
- thisHeaderData = JSON.parse(thisHeaderData);
5867
- } catch (err) {
5868
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5869
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5870
- return callback(null, errorObj);
5871
- }
5872
- } else if (thisHeaderData === null) {
5873
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
5874
- }
5875
-
5876
5040
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
5877
5041
  // see adapter code documentation for more information on the request object's fields
5878
5042
  const reqObj = {
5879
5043
  payload: bodyVars,
5880
5044
  uriPathVars: pathVars,
5881
5045
  uriQuery: queryParams,
5882
- addlHeaders: thisHeaderData
5046
+ authData: {
5047
+ stsParams,
5048
+ roleName
5049
+ }
5883
5050
  };
5884
5051
 
5885
5052
  try {
5886
5053
  // Make the call -
5887
5054
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
5888
- return this.getAuthorizationAndIdentifyRequest('Rest', 'disableHostedZoneDNSSEC', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/disable-dnssec?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5055
+ return this.requestHandlerInst.identifyRequest('Rest', 'disableHostedZoneDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
5889
5056
  // if we received an error or their is no response on the results
5890
5057
  // return an error
5891
5058
  if (irReturnError) {
@@ -5951,7 +5118,6 @@ class AmazonRoute53 extends AdapterBaseCl {
5951
5118
  const meth = 'adapter-disassociateVPCFromHostedZoneSTSRole';
5952
5119
  const origin = `${this.id}-${meth}`;
5953
5120
  log.trace(origin);
5954
- const restVer = this.allProps.aws_ver;
5955
5121
 
5956
5122
  if (this.suspended && this.suspendMode === 'error') {
5957
5123
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -5974,7 +5140,7 @@ class AmazonRoute53 extends AdapterBaseCl {
5974
5140
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
5975
5141
  const queryParamsAvailable = {};
5976
5142
  const queryParams = {};
5977
- const pathVars = [restVer, id];
5143
+ const pathVars = [id];
5978
5144
  const bodyVars = body;
5979
5145
 
5980
5146
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -5985,35 +5151,22 @@ class AmazonRoute53 extends AdapterBaseCl {
5985
5151
  }
5986
5152
  });
5987
5153
 
5988
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
5989
- let thisHeaderData = null;
5990
- // if the additional headers was passed in as a string parse the json into an object
5991
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
5992
- try {
5993
- // parse the additional headers object that was passed in
5994
- thisHeaderData = JSON.parse(thisHeaderData);
5995
- } catch (err) {
5996
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
5997
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5998
- return callback(null, errorObj);
5999
- }
6000
- } else if (thisHeaderData === null) {
6001
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
6002
- }
6003
-
6004
5154
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6005
5155
  // see adapter code documentation for more information on the request object's fields
6006
5156
  const reqObj = {
6007
5157
  payload: bodyVars,
6008
5158
  uriPathVars: pathVars,
6009
5159
  uriQuery: queryParams,
6010
- addlHeaders: thisHeaderData
5160
+ authData: {
5161
+ stsParams,
5162
+ roleName
5163
+ }
6011
5164
  };
6012
5165
 
6013
5166
  try {
6014
5167
  // Make the call -
6015
5168
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6016
- return this.getAuthorizationAndIdentifyRequest('Rest', 'disassociateVPCFromHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/disassociatevpc?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5169
+ return this.requestHandlerInst.identifyRequest('Rest', 'disassociateVPCFromHostedZone', reqObj, true, (irReturnData, irReturnError) => {
6017
5170
  // if we received an error or their is no response on the results
6018
5171
  // return an error
6019
5172
  if (irReturnError) {
@@ -6077,7 +5230,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6077
5230
  const meth = 'adapter-enableHostedZoneDNSSECSTSRole';
6078
5231
  const origin = `${this.id}-${meth}`;
6079
5232
  log.trace(origin);
6080
- const restVer = this.allProps.aws_ver;
6081
5233
 
6082
5234
  if (this.suspended && this.suspendMode === 'error') {
6083
5235
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6095,7 +5247,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6095
5247
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6096
5248
  const queryParamsAvailable = {};
6097
5249
  const queryParams = {};
6098
- const pathVars = [restVer, id];
5250
+ const pathVars = [id];
6099
5251
  const bodyVars = '';
6100
5252
 
6101
5253
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6106,35 +5258,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6106
5258
  }
6107
5259
  });
6108
5260
 
6109
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6110
- let thisHeaderData = null;
6111
- // if the additional headers was passed in as a string parse the json into an object
6112
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6113
- try {
6114
- // parse the additional headers object that was passed in
6115
- thisHeaderData = JSON.parse(thisHeaderData);
6116
- } catch (err) {
6117
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6118
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6119
- return callback(null, errorObj);
6120
- }
6121
- } else if (thisHeaderData === null) {
6122
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6123
- }
6124
-
6125
5261
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6126
5262
  // see adapter code documentation for more information on the request object's fields
6127
5263
  const reqObj = {
6128
5264
  payload: bodyVars,
6129
5265
  uriPathVars: pathVars,
6130
5266
  uriQuery: queryParams,
6131
- addlHeaders: thisHeaderData
5267
+ authData: {
5268
+ stsParams,
5269
+ roleName
5270
+ }
6132
5271
  };
6133
5272
 
6134
5273
  try {
6135
5274
  // Make the call -
6136
5275
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6137
- return this.getAuthorizationAndIdentifyRequest('Rest', 'enableHostedZoneDNSSEC', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/enable-dnssec?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5276
+ return this.requestHandlerInst.identifyRequest('Rest', 'enableHostedZoneDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
6138
5277
  // if we received an error or their is no response on the results
6139
5278
  // return an error
6140
5279
  if (irReturnError) {
@@ -6198,7 +5337,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6198
5337
  const meth = 'adapter-getAccountLimitSTSRole';
6199
5338
  const origin = `${this.id}-${meth}`;
6200
5339
  log.trace(origin);
6201
- const restVer = this.allProps.aws_ver;
6202
5340
 
6203
5341
  if (this.suspended && this.suspendMode === 'error') {
6204
5342
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6216,7 +5354,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6216
5354
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6217
5355
  const queryParamsAvailable = {};
6218
5356
  const queryParams = {};
6219
- const pathVars = [restVer, type];
5357
+ const pathVars = [type];
6220
5358
  const bodyVars = {};
6221
5359
 
6222
5360
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6227,35 +5365,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6227
5365
  }
6228
5366
  });
6229
5367
 
6230
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6231
- let thisHeaderData = null;
6232
- // if the additional headers was passed in as a string parse the json into an object
6233
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6234
- try {
6235
- // parse the additional headers object that was passed in
6236
- thisHeaderData = JSON.parse(thisHeaderData);
6237
- } catch (err) {
6238
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6239
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6240
- return callback(null, errorObj);
6241
- }
6242
- } else if (thisHeaderData === null) {
6243
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6244
- }
6245
-
6246
5368
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6247
5369
  // see adapter code documentation for more information on the request object's fields
6248
5370
  const reqObj = {
6249
5371
  payload: bodyVars,
6250
5372
  uriPathVars: pathVars,
6251
5373
  uriQuery: queryParams,
6252
- addlHeaders: thisHeaderData
5374
+ authData: {
5375
+ stsParams,
5376
+ roleName
5377
+ }
6253
5378
  };
6254
5379
 
6255
5380
  try {
6256
5381
  // Make the call -
6257
5382
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6258
- return this.getAuthorizationAndIdentifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/accountlimit/${type}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5383
+ return this.requestHandlerInst.identifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
6259
5384
  // if we received an error or their is no response on the results
6260
5385
  // return an error
6261
5386
  if (irReturnError) {
@@ -6319,7 +5444,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6319
5444
  const meth = 'adapter-getChangeSTSRole';
6320
5445
  const origin = `${this.id}-${meth}`;
6321
5446
  log.trace(origin);
6322
- const restVer = this.allProps.aws_ver;
6323
5447
 
6324
5448
  if (this.suspended && this.suspendMode === 'error') {
6325
5449
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6337,7 +5461,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6337
5461
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6338
5462
  const queryParamsAvailable = {};
6339
5463
  const queryParams = {};
6340
- const pathVars = [restVer, id];
5464
+ const pathVars = [id];
6341
5465
  const bodyVars = {};
6342
5466
 
6343
5467
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6348,35 +5472,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6348
5472
  }
6349
5473
  });
6350
5474
 
6351
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6352
- let thisHeaderData = null;
6353
- // if the additional headers was passed in as a string parse the json into an object
6354
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6355
- try {
6356
- // parse the additional headers object that was passed in
6357
- thisHeaderData = JSON.parse(thisHeaderData);
6358
- } catch (err) {
6359
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6360
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6361
- return callback(null, errorObj);
6362
- }
6363
- } else if (thisHeaderData === null) {
6364
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6365
- }
6366
-
6367
5475
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6368
5476
  // see adapter code documentation for more information on the request object's fields
6369
5477
  const reqObj = {
6370
5478
  payload: bodyVars,
6371
5479
  uriPathVars: pathVars,
6372
5480
  uriQuery: queryParams,
6373
- addlHeaders: thisHeaderData
5481
+ authData: {
5482
+ stsParams,
5483
+ roleName
5484
+ }
6374
5485
  };
6375
5486
 
6376
5487
  try {
6377
5488
  // Make the call -
6378
5489
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6379
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getChange', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/change/${id}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5490
+ return this.requestHandlerInst.identifyRequest('Rest', 'getChange', reqObj, true, (irReturnData, irReturnError) => {
6380
5491
  // if we received an error or their is no response on the results
6381
5492
  // return an error
6382
5493
  if (irReturnError) {
@@ -6438,7 +5549,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6438
5549
  const meth = 'adapter-getCheckerIpRangesSTSRole';
6439
5550
  const origin = `${this.id}-${meth}`;
6440
5551
  log.trace(origin);
6441
- const restVer = this.allProps.aws_ver;
6442
5552
 
6443
5553
  if (this.suspended && this.suspendMode === 'error') {
6444
5554
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6451,7 +5561,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6451
5561
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6452
5562
  const queryParamsAvailable = {};
6453
5563
  const queryParams = {};
6454
- const pathVars = [restVer];
5564
+ const pathVars = [];
6455
5565
  const bodyVars = {};
6456
5566
 
6457
5567
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6462,35 +5572,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6462
5572
  }
6463
5573
  });
6464
5574
 
6465
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6466
- let thisHeaderData = null;
6467
- // if the additional headers was passed in as a string parse the json into an object
6468
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6469
- try {
6470
- // parse the additional headers object that was passed in
6471
- thisHeaderData = JSON.parse(thisHeaderData);
6472
- } catch (err) {
6473
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6474
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6475
- return callback(null, errorObj);
6476
- }
6477
- } else if (thisHeaderData === null) {
6478
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6479
- }
6480
-
6481
5575
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6482
5576
  // see adapter code documentation for more information on the request object's fields
6483
5577
  const reqObj = {
6484
5578
  payload: bodyVars,
6485
5579
  uriPathVars: pathVars,
6486
5580
  uriQuery: queryParams,
6487
- addlHeaders: thisHeaderData
5581
+ authData: {
5582
+ stsParams,
5583
+ roleName
5584
+ }
6488
5585
  };
6489
5586
 
6490
5587
  try {
6491
5588
  // Make the call -
6492
5589
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6493
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getCheckerIpRanges', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/checkeripranges?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5590
+ return this.requestHandlerInst.identifyRequest('Rest', 'getCheckerIpRanges', reqObj, true, (irReturnData, irReturnError) => {
6494
5591
  // if we received an error or their is no response on the results
6495
5592
  // return an error
6496
5593
  if (irReturnError) {
@@ -6554,7 +5651,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6554
5651
  const meth = 'adapter-getDNSSECSTSRole';
6555
5652
  const origin = `${this.id}-${meth}`;
6556
5653
  log.trace(origin);
6557
- const restVer = this.allProps.aws_ver;
6558
5654
 
6559
5655
  if (this.suspended && this.suspendMode === 'error') {
6560
5656
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6572,7 +5668,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6572
5668
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6573
5669
  const queryParamsAvailable = {};
6574
5670
  const queryParams = {};
6575
- const pathVars = [restVer, id];
5671
+ const pathVars = [id];
6576
5672
  const bodyVars = {};
6577
5673
 
6578
5674
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6583,35 +5679,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6583
5679
  }
6584
5680
  });
6585
5681
 
6586
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6587
- let thisHeaderData = null;
6588
- // if the additional headers was passed in as a string parse the json into an object
6589
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6590
- try {
6591
- // parse the additional headers object that was passed in
6592
- thisHeaderData = JSON.parse(thisHeaderData);
6593
- } catch (err) {
6594
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6595
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6596
- return callback(null, errorObj);
6597
- }
6598
- } else if (thisHeaderData === null) {
6599
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6600
- }
6601
-
6602
5682
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6603
5683
  // see adapter code documentation for more information on the request object's fields
6604
5684
  const reqObj = {
6605
5685
  payload: bodyVars,
6606
5686
  uriPathVars: pathVars,
6607
5687
  uriQuery: queryParams,
6608
- addlHeaders: thisHeaderData
5688
+ authData: {
5689
+ stsParams,
5690
+ roleName
5691
+ }
6609
5692
  };
6610
5693
 
6611
5694
  try {
6612
5695
  // Make the call -
6613
5696
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6614
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getDNSSEC', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/dnssec?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5697
+ return this.requestHandlerInst.identifyRequest('Rest', 'getDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
6615
5698
  // if we received an error or their is no response on the results
6616
5699
  // return an error
6617
5700
  if (irReturnError) {
@@ -6679,7 +5762,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6679
5762
  const meth = 'adapter-getGeoLocationSTSRole';
6680
5763
  const origin = `${this.id}-${meth}`;
6681
5764
  log.trace(origin);
6682
- const restVer = this.allProps.aws_ver;
6683
5765
 
6684
5766
  if (this.suspended && this.suspendMode === 'error') {
6685
5767
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6692,7 +5774,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6692
5774
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6693
5775
  const queryParamsAvailable = { continentcode, countrycode, subdivisioncode };
6694
5776
  const queryParams = {};
6695
- const pathVars = [restVer];
5777
+ const pathVars = [];
6696
5778
  const bodyVars = {};
6697
5779
 
6698
5780
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6703,35 +5785,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6703
5785
  }
6704
5786
  });
6705
5787
 
6706
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6707
- let thisHeaderData = null;
6708
- // if the additional headers was passed in as a string parse the json into an object
6709
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6710
- try {
6711
- // parse the additional headers object that was passed in
6712
- thisHeaderData = JSON.parse(thisHeaderData);
6713
- } catch (err) {
6714
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6715
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6716
- return callback(null, errorObj);
6717
- }
6718
- } else if (thisHeaderData === null) {
6719
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6720
- }
6721
-
6722
5788
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6723
5789
  // see adapter code documentation for more information on the request object's fields
6724
5790
  const reqObj = {
6725
5791
  payload: bodyVars,
6726
5792
  uriPathVars: pathVars,
6727
5793
  uriQuery: queryParams,
6728
- addlHeaders: thisHeaderData
5794
+ authData: {
5795
+ stsParams,
5796
+ roleName
5797
+ }
6729
5798
  };
6730
5799
 
6731
5800
  try {
6732
5801
  // Make the call -
6733
5802
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6734
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getGeoLocation', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/geolocation?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5803
+ return this.requestHandlerInst.identifyRequest('Rest', 'getGeoLocation', reqObj, true, (irReturnData, irReturnError) => {
6735
5804
  // if we received an error or their is no response on the results
6736
5805
  // return an error
6737
5806
  if (irReturnError) {
@@ -6793,7 +5862,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6793
5862
  const meth = 'adapter-getHealthCheckCountSTSRole';
6794
5863
  const origin = `${this.id}-${meth}`;
6795
5864
  log.trace(origin);
6796
- const restVer = this.allProps.aws_ver;
6797
5865
 
6798
5866
  if (this.suspended && this.suspendMode === 'error') {
6799
5867
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6806,7 +5874,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6806
5874
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6807
5875
  const queryParamsAvailable = {};
6808
5876
  const queryParams = {};
6809
- const pathVars = [restVer];
5877
+ const pathVars = [];
6810
5878
  const bodyVars = {};
6811
5879
 
6812
5880
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6817,35 +5885,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6817
5885
  }
6818
5886
  });
6819
5887
 
6820
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6821
- let thisHeaderData = null;
6822
- // if the additional headers was passed in as a string parse the json into an object
6823
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6824
- try {
6825
- // parse the additional headers object that was passed in
6826
- thisHeaderData = JSON.parse(thisHeaderData);
6827
- } catch (err) {
6828
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6829
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6830
- return callback(null, errorObj);
6831
- }
6832
- } else if (thisHeaderData === null) {
6833
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6834
- }
6835
-
6836
5888
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6837
5889
  // see adapter code documentation for more information on the request object's fields
6838
5890
  const reqObj = {
6839
5891
  payload: bodyVars,
6840
5892
  uriPathVars: pathVars,
6841
5893
  uriQuery: queryParams,
6842
- addlHeaders: thisHeaderData
5894
+ authData: {
5895
+ stsParams,
5896
+ roleName
5897
+ }
6843
5898
  };
6844
5899
 
6845
5900
  try {
6846
5901
  // Make the call -
6847
5902
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6848
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHealthCheckCount', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheckcount?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
5903
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckCount', reqObj, true, (irReturnData, irReturnError) => {
6849
5904
  // if we received an error or their is no response on the results
6850
5905
  // return an error
6851
5906
  if (irReturnError) {
@@ -6909,7 +5964,6 @@ class AmazonRoute53 extends AdapterBaseCl {
6909
5964
  const meth = 'adapter-getHealthCheckLastFailureReasonSTSRole';
6910
5965
  const origin = `${this.id}-${meth}`;
6911
5966
  log.trace(origin);
6912
- const restVer = this.allProps.aws_ver;
6913
5967
 
6914
5968
  if (this.suspended && this.suspendMode === 'error') {
6915
5969
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -6927,7 +5981,7 @@ class AmazonRoute53 extends AdapterBaseCl {
6927
5981
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6928
5982
  const queryParamsAvailable = {};
6929
5983
  const queryParams = {};
6930
- const pathVars = [restVer, healthCheckId];
5984
+ const pathVars = [healthCheckId];
6931
5985
  const bodyVars = {};
6932
5986
 
6933
5987
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -6938,35 +5992,22 @@ class AmazonRoute53 extends AdapterBaseCl {
6938
5992
  }
6939
5993
  });
6940
5994
 
6941
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
6942
- let thisHeaderData = null;
6943
- // if the additional headers was passed in as a string parse the json into an object
6944
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
6945
- try {
6946
- // parse the additional headers object that was passed in
6947
- thisHeaderData = JSON.parse(thisHeaderData);
6948
- } catch (err) {
6949
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
6950
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6951
- return callback(null, errorObj);
6952
- }
6953
- } else if (thisHeaderData === null) {
6954
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
6955
- }
6956
-
6957
5995
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
6958
5996
  // see adapter code documentation for more information on the request object's fields
6959
5997
  const reqObj = {
6960
5998
  payload: bodyVars,
6961
5999
  uriPathVars: pathVars,
6962
6000
  uriQuery: queryParams,
6963
- addlHeaders: thisHeaderData
6001
+ authData: {
6002
+ stsParams,
6003
+ roleName
6004
+ }
6964
6005
  };
6965
6006
 
6966
6007
  try {
6967
6008
  // Make the call -
6968
6009
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
6969
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHealthCheckLastFailureReason', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck/${healthCheckId}/lastfailurereason?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6010
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckLastFailureReason', reqObj, true, (irReturnData, irReturnError) => {
6970
6011
  // if we received an error or their is no response on the results
6971
6012
  // return an error
6972
6013
  if (irReturnError) {
@@ -7030,7 +6071,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7030
6071
  const meth = 'adapter-getHealthCheckStatusSTSRole';
7031
6072
  const origin = `${this.id}-${meth}`;
7032
6073
  log.trace(origin);
7033
- const restVer = this.allProps.aws_ver;
7034
6074
 
7035
6075
  if (this.suspended && this.suspendMode === 'error') {
7036
6076
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7048,7 +6088,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7048
6088
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7049
6089
  const queryParamsAvailable = {};
7050
6090
  const queryParams = {};
7051
- const pathVars = [restVer, healthCheckId];
6091
+ const pathVars = [healthCheckId];
7052
6092
  const bodyVars = {};
7053
6093
 
7054
6094
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7059,35 +6099,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7059
6099
  }
7060
6100
  });
7061
6101
 
7062
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7063
- let thisHeaderData = null;
7064
- // if the additional headers was passed in as a string parse the json into an object
7065
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7066
- try {
7067
- // parse the additional headers object that was passed in
7068
- thisHeaderData = JSON.parse(thisHeaderData);
7069
- } catch (err) {
7070
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7071
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7072
- return callback(null, errorObj);
7073
- }
7074
- } else if (thisHeaderData === null) {
7075
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7076
- }
7077
-
7078
6102
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7079
6103
  // see adapter code documentation for more information on the request object's fields
7080
6104
  const reqObj = {
7081
6105
  payload: bodyVars,
7082
6106
  uriPathVars: pathVars,
7083
6107
  uriQuery: queryParams,
7084
- addlHeaders: thisHeaderData
6108
+ authData: {
6109
+ stsParams,
6110
+ roleName
6111
+ }
7085
6112
  };
7086
6113
 
7087
6114
  try {
7088
6115
  // Make the call -
7089
6116
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7090
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHealthCheckStatus', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/healthcheck/${healthCheckId}/status?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6117
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckStatus', reqObj, true, (irReturnData, irReturnError) => {
7091
6118
  // if we received an error or their is no response on the results
7092
6119
  // return an error
7093
6120
  if (irReturnError) {
@@ -7149,7 +6176,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7149
6176
  const meth = 'adapter-getHostedZoneCountSTSRole';
7150
6177
  const origin = `${this.id}-${meth}`;
7151
6178
  log.trace(origin);
7152
- const restVer = this.allProps.aws_ver;
7153
6179
 
7154
6180
  if (this.suspended && this.suspendMode === 'error') {
7155
6181
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7162,7 +6188,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7162
6188
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7163
6189
  const queryParamsAvailable = {};
7164
6190
  const queryParams = {};
7165
- const pathVars = [restVer];
6191
+ const pathVars = [];
7166
6192
  const bodyVars = {};
7167
6193
 
7168
6194
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7173,35 +6199,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7173
6199
  }
7174
6200
  });
7175
6201
 
7176
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7177
- let thisHeaderData = null;
7178
- // if the additional headers was passed in as a string parse the json into an object
7179
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7180
- try {
7181
- // parse the additional headers object that was passed in
7182
- thisHeaderData = JSON.parse(thisHeaderData);
7183
- } catch (err) {
7184
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7185
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7186
- return callback(null, errorObj);
7187
- }
7188
- } else if (thisHeaderData === null) {
7189
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7190
- }
7191
-
7192
6202
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7193
6203
  // see adapter code documentation for more information on the request object's fields
7194
6204
  const reqObj = {
7195
6205
  payload: bodyVars,
7196
6206
  uriPathVars: pathVars,
7197
6207
  uriQuery: queryParams,
7198
- addlHeaders: thisHeaderData
6208
+ authData: {
6209
+ stsParams,
6210
+ roleName
6211
+ }
7199
6212
  };
7200
6213
 
7201
6214
  try {
7202
6215
  // Make the call -
7203
6216
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7204
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHostedZoneCount', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzonecount?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6217
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZoneCount', reqObj, true, (irReturnData, irReturnError) => {
7205
6218
  // if we received an error or their is no response on the results
7206
6219
  // return an error
7207
6220
  if (irReturnError) {
@@ -7267,7 +6280,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7267
6280
  const meth = 'adapter-getHostedZoneLimitSTSRole';
7268
6281
  const origin = `${this.id}-${meth}`;
7269
6282
  log.trace(origin);
7270
- const restVer = this.allProps.aws_ver;
7271
6283
 
7272
6284
  if (this.suspended && this.suspendMode === 'error') {
7273
6285
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7290,7 +6302,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7290
6302
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7291
6303
  const queryParamsAvailable = {};
7292
6304
  const queryParams = {};
7293
- const pathVars = [restVer, id, type];
6305
+ const pathVars = [id, type];
7294
6306
  const bodyVars = {};
7295
6307
 
7296
6308
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7301,35 +6313,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7301
6313
  }
7302
6314
  });
7303
6315
 
7304
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7305
- let thisHeaderData = null;
7306
- // if the additional headers was passed in as a string parse the json into an object
7307
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7308
- try {
7309
- // parse the additional headers object that was passed in
7310
- thisHeaderData = JSON.parse(thisHeaderData);
7311
- } catch (err) {
7312
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7313
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7314
- return callback(null, errorObj);
7315
- }
7316
- } else if (thisHeaderData === null) {
7317
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7318
- }
7319
-
7320
6316
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7321
6317
  // see adapter code documentation for more information on the request object's fields
7322
6318
  const reqObj = {
7323
6319
  payload: bodyVars,
7324
6320
  uriPathVars: pathVars,
7325
6321
  uriQuery: queryParams,
7326
- addlHeaders: thisHeaderData
6322
+ authData: {
6323
+ stsParams,
6324
+ roleName
6325
+ }
7327
6326
  };
7328
6327
 
7329
6328
  try {
7330
6329
  // Make the call -
7331
6330
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7332
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getHostedZoneLimit', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzonelimit/${id}/${type}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6331
+ return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZoneLimit', reqObj, true, (irReturnData, irReturnError) => {
7333
6332
  // if we received an error or their is no response on the results
7334
6333
  // return an error
7335
6334
  if (irReturnError) {
@@ -7395,7 +6394,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7395
6394
  const meth = 'adapter-getReusableDelegationSetLimitSTSRole';
7396
6395
  const origin = `${this.id}-${meth}`;
7397
6396
  log.trace(origin);
7398
- const restVer = this.allProps.aws_ver;
7399
6397
 
7400
6398
  if (this.suspended && this.suspendMode === 'error') {
7401
6399
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7418,7 +6416,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7418
6416
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7419
6417
  const queryParamsAvailable = {};
7420
6418
  const queryParams = {};
7421
- const pathVars = [restVer, id, type];
6419
+ const pathVars = [id, type];
7422
6420
  const bodyVars = {};
7423
6421
 
7424
6422
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7429,35 +6427,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7429
6427
  }
7430
6428
  });
7431
6429
 
7432
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7433
- let thisHeaderData = null;
7434
- // if the additional headers was passed in as a string parse the json into an object
7435
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7436
- try {
7437
- // parse the additional headers object that was passed in
7438
- thisHeaderData = JSON.parse(thisHeaderData);
7439
- } catch (err) {
7440
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7441
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7442
- return callback(null, errorObj);
7443
- }
7444
- } else if (thisHeaderData === null) {
7445
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7446
- }
7447
-
7448
6430
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7449
6431
  // see adapter code documentation for more information on the request object's fields
7450
6432
  const reqObj = {
7451
6433
  payload: bodyVars,
7452
6434
  uriPathVars: pathVars,
7453
6435
  uriQuery: queryParams,
7454
- addlHeaders: thisHeaderData
6436
+ authData: {
6437
+ stsParams,
6438
+ roleName
6439
+ }
7455
6440
  };
7456
6441
 
7457
6442
  try {
7458
6443
  // Make the call -
7459
6444
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7460
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getReusableDelegationSetLimit', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/reusabledelegationsetlimit/${id}/${type}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6445
+ return this.requestHandlerInst.identifyRequest('Rest', 'getReusableDelegationSetLimit', reqObj, true, (irReturnData, irReturnError) => {
7461
6446
  // if we received an error or their is no response on the results
7462
6447
  // return an error
7463
6448
  if (irReturnError) {
@@ -7519,7 +6504,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7519
6504
  const meth = 'adapter-getTrafficPolicyInstanceCountSTSRole';
7520
6505
  const origin = `${this.id}-${meth}`;
7521
6506
  log.trace(origin);
7522
- const restVer = this.allProps.aws_ver;
7523
6507
 
7524
6508
  if (this.suspended && this.suspendMode === 'error') {
7525
6509
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7532,7 +6516,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7532
6516
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7533
6517
  const queryParamsAvailable = {};
7534
6518
  const queryParams = {};
7535
- const pathVars = [restVer];
6519
+ const pathVars = [];
7536
6520
  const bodyVars = {};
7537
6521
 
7538
6522
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7543,35 +6527,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7543
6527
  }
7544
6528
  });
7545
6529
 
7546
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7547
- let thisHeaderData = null;
7548
- // if the additional headers was passed in as a string parse the json into an object
7549
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7550
- try {
7551
- // parse the additional headers object that was passed in
7552
- thisHeaderData = JSON.parse(thisHeaderData);
7553
- } catch (err) {
7554
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7555
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7556
- return callback(null, errorObj);
7557
- }
7558
- } else if (thisHeaderData === null) {
7559
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7560
- }
7561
-
7562
6530
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7563
6531
  // see adapter code documentation for more information on the request object's fields
7564
6532
  const reqObj = {
7565
6533
  payload: bodyVars,
7566
6534
  uriPathVars: pathVars,
7567
6535
  uriQuery: queryParams,
7568
- addlHeaders: thisHeaderData
6536
+ authData: {
6537
+ stsParams,
6538
+ roleName
6539
+ }
7569
6540
  };
7570
6541
 
7571
6542
  try {
7572
6543
  // Make the call -
7573
6544
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7574
- return this.getAuthorizationAndIdentifyRequest('Rest', 'getTrafficPolicyInstanceCount', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstancecount?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6545
+ return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicyInstanceCount', reqObj, true, (irReturnData, irReturnError) => {
7575
6546
  // if we received an error or their is no response on the results
7576
6547
  // return an error
7577
6548
  if (irReturnError) {
@@ -7641,7 +6612,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7641
6612
  const meth = 'adapter-listGeoLocationsSTSRole';
7642
6613
  const origin = `${this.id}-${meth}`;
7643
6614
  log.trace(origin);
7644
- const restVer = this.allProps.aws_ver;
7645
6615
 
7646
6616
  if (this.suspended && this.suspendMode === 'error') {
7647
6617
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7654,7 +6624,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7654
6624
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7655
6625
  const queryParamsAvailable = { startcontinentcode, startcountrycode, startsubdivisioncode, maxitems };
7656
6626
  const queryParams = {};
7657
- const pathVars = [restVer];
6627
+ const pathVars = [];
7658
6628
  const bodyVars = {};
7659
6629
 
7660
6630
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7665,35 +6635,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7665
6635
  }
7666
6636
  });
7667
6637
 
7668
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7669
- let thisHeaderData = null;
7670
- // if the additional headers was passed in as a string parse the json into an object
7671
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7672
- try {
7673
- // parse the additional headers object that was passed in
7674
- thisHeaderData = JSON.parse(thisHeaderData);
7675
- } catch (err) {
7676
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7677
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7678
- return callback(null, errorObj);
7679
- }
7680
- } else if (thisHeaderData === null) {
7681
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7682
- }
7683
-
7684
6638
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7685
6639
  // see adapter code documentation for more information on the request object's fields
7686
6640
  const reqObj = {
7687
6641
  payload: bodyVars,
7688
6642
  uriPathVars: pathVars,
7689
6643
  uriQuery: queryParams,
7690
- addlHeaders: thisHeaderData
6644
+ authData: {
6645
+ stsParams,
6646
+ roleName
6647
+ }
7691
6648
  };
7692
6649
 
7693
6650
  try {
7694
6651
  // Make the call -
7695
6652
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7696
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listGeoLocations', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/geolocations?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6653
+ return this.requestHandlerInst.identifyRequest('Rest', 'listGeoLocations', reqObj, true, (irReturnData, irReturnError) => {
7697
6654
  // if we received an error or their is no response on the results
7698
6655
  // return an error
7699
6656
  if (irReturnError) {
@@ -7761,7 +6718,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7761
6718
  const meth = 'adapter-listHostedZonesByNameSTSRole';
7762
6719
  const origin = `${this.id}-${meth}`;
7763
6720
  log.trace(origin);
7764
- const restVer = this.allProps.aws_ver;
7765
6721
 
7766
6722
  if (this.suspended && this.suspendMode === 'error') {
7767
6723
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7774,7 +6730,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7774
6730
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7775
6731
  const queryParamsAvailable = { dnsname, hostedzoneid, maxitems };
7776
6732
  const queryParams = {};
7777
- const pathVars = [restVer];
6733
+ const pathVars = [];
7778
6734
  const bodyVars = {};
7779
6735
 
7780
6736
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7785,35 +6741,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7785
6741
  }
7786
6742
  });
7787
6743
 
7788
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7789
- let thisHeaderData = null;
7790
- // if the additional headers was passed in as a string parse the json into an object
7791
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7792
- try {
7793
- // parse the additional headers object that was passed in
7794
- thisHeaderData = JSON.parse(thisHeaderData);
7795
- } catch (err) {
7796
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7797
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7798
- return callback(null, errorObj);
7799
- }
7800
- } else if (thisHeaderData === null) {
7801
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7802
- }
7803
-
7804
6744
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7805
6745
  // see adapter code documentation for more information on the request object's fields
7806
6746
  const reqObj = {
7807
6747
  payload: bodyVars,
7808
6748
  uriPathVars: pathVars,
7809
6749
  uriQuery: queryParams,
7810
- addlHeaders: thisHeaderData
6750
+ authData: {
6751
+ stsParams,
6752
+ roleName
6753
+ }
7811
6754
  };
7812
6755
 
7813
6756
  try {
7814
6757
  // Make the call -
7815
6758
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7816
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listHostedZonesByName', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzonesbyname?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6759
+ return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZonesByName', reqObj, true, (irReturnData, irReturnError) => {
7817
6760
  // if we received an error or their is no response on the results
7818
6761
  // return an error
7819
6762
  if (irReturnError) {
@@ -7883,7 +6826,6 @@ class AmazonRoute53 extends AdapterBaseCl {
7883
6826
  const meth = 'adapter-listHostedZonesByVPCSTSRole';
7884
6827
  const origin = `${this.id}-${meth}`;
7885
6828
  log.trace(origin);
7886
- const restVer = this.allProps.aws_ver;
7887
6829
 
7888
6830
  if (this.suspended && this.suspendMode === 'error') {
7889
6831
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -7906,7 +6848,7 @@ class AmazonRoute53 extends AdapterBaseCl {
7906
6848
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
7907
6849
  const queryParamsAvailable = { vpcid, vpcregion, maxitems, nexttoken };
7908
6850
  const queryParams = {};
7909
- const pathVars = [restVer];
6851
+ const pathVars = [];
7910
6852
  const bodyVars = {};
7911
6853
 
7912
6854
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -7917,35 +6859,22 @@ class AmazonRoute53 extends AdapterBaseCl {
7917
6859
  }
7918
6860
  });
7919
6861
 
7920
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
7921
- let thisHeaderData = null;
7922
- // if the additional headers was passed in as a string parse the json into an object
7923
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
7924
- try {
7925
- // parse the additional headers object that was passed in
7926
- thisHeaderData = JSON.parse(thisHeaderData);
7927
- } catch (err) {
7928
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
7929
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7930
- return callback(null, errorObj);
7931
- }
7932
- } else if (thisHeaderData === null) {
7933
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
7934
- }
7935
-
7936
6862
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
7937
6863
  // see adapter code documentation for more information on the request object's fields
7938
6864
  const reqObj = {
7939
6865
  payload: bodyVars,
7940
6866
  uriPathVars: pathVars,
7941
6867
  uriQuery: queryParams,
7942
- addlHeaders: thisHeaderData
6868
+ authData: {
6869
+ stsParams,
6870
+ roleName
6871
+ }
7943
6872
  };
7944
6873
 
7945
6874
  try {
7946
6875
  // Make the call -
7947
6876
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
7948
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listHostedZonesByVPC', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzonesbyvpc?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
6877
+ return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZonesByVPC', reqObj, true, (irReturnData, irReturnError) => {
7949
6878
  // if we received an error or their is no response on the results
7950
6879
  // return an error
7951
6880
  if (irReturnError) {
@@ -8025,7 +6954,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8025
6954
  const meth = 'adapter-listResourceRecordSetsSTSRole';
8026
6955
  const origin = `${this.id}-${meth}`;
8027
6956
  log.trace(origin);
8028
- const restVer = this.allProps.aws_ver;
8029
6957
 
8030
6958
  if (this.suspended && this.suspendMode === 'error') {
8031
6959
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8043,7 +6971,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8043
6971
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8044
6972
  const queryParamsAvailable = { name, type, identifier, maxitems, maxItems, startRecordName, startRecordType, startRecordIdentifier };
8045
6973
  const queryParams = {};
8046
- const pathVars = [restVer, id];
6974
+ const pathVars = [id];
8047
6975
  const bodyVars = {};
8048
6976
 
8049
6977
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8054,35 +6982,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8054
6982
  }
8055
6983
  });
8056
6984
 
8057
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8058
- let thisHeaderData = null;
8059
- // if the additional headers was passed in as a string parse the json into an object
8060
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8061
- try {
8062
- // parse the additional headers object that was passed in
8063
- thisHeaderData = JSON.parse(thisHeaderData);
8064
- } catch (err) {
8065
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8066
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8067
- return callback(null, errorObj);
8068
- }
8069
- } else if (thisHeaderData === null) {
8070
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8071
- }
8072
-
8073
6985
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8074
6986
  // see adapter code documentation for more information on the request object's fields
8075
6987
  const reqObj = {
8076
6988
  payload: bodyVars,
8077
6989
  uriPathVars: pathVars,
8078
6990
  uriQuery: queryParams,
8079
- addlHeaders: thisHeaderData
6991
+ authData: {
6992
+ stsParams,
6993
+ roleName
6994
+ }
8080
6995
  };
8081
6996
 
8082
6997
  try {
8083
6998
  // Make the call -
8084
6999
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8085
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listResourceRecordSets', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/hostedzone/${id}/rrset?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7000
+ return this.requestHandlerInst.identifyRequest('Rest', 'listResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
8086
7001
  // if we received an error or their is no response on the results
8087
7002
  // return an error
8088
7003
  if (irReturnError) {
@@ -8148,7 +7063,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8148
7063
  const meth = 'adapter-listTagsForResourcesSTSRole';
8149
7064
  const origin = `${this.id}-${meth}`;
8150
7065
  log.trace(origin);
8151
- const restVer = this.allProps.aws_ver;
8152
7066
 
8153
7067
  if (this.suspended && this.suspendMode === 'error') {
8154
7068
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8171,7 +7085,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8171
7085
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8172
7086
  const queryParamsAvailable = {};
8173
7087
  const queryParams = {};
8174
- const pathVars = [restVer, resourceType];
7088
+ const pathVars = [resourceType];
8175
7089
  const bodyVars = body;
8176
7090
 
8177
7091
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8182,35 +7096,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8182
7096
  }
8183
7097
  });
8184
7098
 
8185
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8186
- let thisHeaderData = null;
8187
- // if the additional headers was passed in as a string parse the json into an object
8188
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8189
- try {
8190
- // parse the additional headers object that was passed in
8191
- thisHeaderData = JSON.parse(thisHeaderData);
8192
- } catch (err) {
8193
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8194
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8195
- return callback(null, errorObj);
8196
- }
8197
- } else if (thisHeaderData === null) {
8198
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
8199
- }
8200
-
8201
7099
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8202
7100
  // see adapter code documentation for more information on the request object's fields
8203
7101
  const reqObj = {
8204
7102
  payload: bodyVars,
8205
7103
  uriPathVars: pathVars,
8206
7104
  uriQuery: queryParams,
8207
- addlHeaders: thisHeaderData
7105
+ authData: {
7106
+ stsParams,
7107
+ roleName
7108
+ }
8208
7109
  };
8209
7110
 
8210
7111
  try {
8211
7112
  // Make the call -
8212
7113
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8213
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTagsForResources', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/tags/${resourceType}?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7114
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTagsForResources', reqObj, true, (irReturnData, irReturnError) => {
8214
7115
  // if we received an error or their is no response on the results
8215
7116
  // return an error
8216
7117
  if (irReturnError) {
@@ -8276,7 +7177,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8276
7177
  const meth = 'adapter-listTrafficPoliciesSTSRole';
8277
7178
  const origin = `${this.id}-${meth}`;
8278
7179
  log.trace(origin);
8279
- const restVer = this.allProps.aws_ver;
8280
7180
 
8281
7181
  if (this.suspended && this.suspendMode === 'error') {
8282
7182
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8289,7 +7189,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8289
7189
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8290
7190
  const queryParamsAvailable = { trafficpolicyid, maxitems };
8291
7191
  const queryParams = {};
8292
- const pathVars = [restVer];
7192
+ const pathVars = [];
8293
7193
  const bodyVars = {};
8294
7194
 
8295
7195
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8300,35 +7200,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8300
7200
  }
8301
7201
  });
8302
7202
 
8303
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8304
- let thisHeaderData = null;
8305
- // if the additional headers was passed in as a string parse the json into an object
8306
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8307
- try {
8308
- // parse the additional headers object that was passed in
8309
- thisHeaderData = JSON.parse(thisHeaderData);
8310
- } catch (err) {
8311
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8312
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8313
- return callback(null, errorObj);
8314
- }
8315
- } else if (thisHeaderData === null) {
8316
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8317
- }
8318
-
8319
7203
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8320
7204
  // see adapter code documentation for more information on the request object's fields
8321
7205
  const reqObj = {
8322
7206
  payload: bodyVars,
8323
7207
  uriPathVars: pathVars,
8324
7208
  uriQuery: queryParams,
8325
- addlHeaders: thisHeaderData
7209
+ authData: {
7210
+ stsParams,
7211
+ roleName
7212
+ }
8326
7213
  };
8327
7214
 
8328
7215
  try {
8329
7216
  // Make the call -
8330
7217
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8331
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTrafficPolicies', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicies?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7218
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicies', reqObj, true, (irReturnData, irReturnError) => {
8332
7219
  // if we received an error or their is no response on the results
8333
7220
  // return an error
8334
7221
  if (irReturnError) {
@@ -8398,7 +7285,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8398
7285
  const meth = 'adapter-listTrafficPolicyInstancesSTSRole';
8399
7286
  const origin = `${this.id}-${meth}`;
8400
7287
  log.trace(origin);
8401
- const restVer = this.allProps.aws_ver;
8402
7288
 
8403
7289
  if (this.suspended && this.suspendMode === 'error') {
8404
7290
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8411,7 +7297,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8411
7297
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8412
7298
  const queryParamsAvailable = { hostedzoneid, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
8413
7299
  const queryParams = {};
8414
- const pathVars = [restVer];
7300
+ const pathVars = [];
8415
7301
  const bodyVars = {};
8416
7302
 
8417
7303
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8422,35 +7308,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8422
7308
  }
8423
7309
  });
8424
7310
 
8425
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8426
- let thisHeaderData = null;
8427
- // if the additional headers was passed in as a string parse the json into an object
8428
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8429
- try {
8430
- // parse the additional headers object that was passed in
8431
- thisHeaderData = JSON.parse(thisHeaderData);
8432
- } catch (err) {
8433
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8434
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8435
- return callback(null, errorObj);
8436
- }
8437
- } else if (thisHeaderData === null) {
8438
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8439
- }
8440
-
8441
7311
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8442
7312
  // see adapter code documentation for more information on the request object's fields
8443
7313
  const reqObj = {
8444
7314
  payload: bodyVars,
8445
7315
  uriPathVars: pathVars,
8446
7316
  uriQuery: queryParams,
8447
- addlHeaders: thisHeaderData
7317
+ authData: {
7318
+ stsParams,
7319
+ roleName
7320
+ }
8448
7321
  };
8449
7322
 
8450
7323
  try {
8451
7324
  // Make the call -
8452
7325
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8453
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTrafficPolicyInstances', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstances?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7326
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstances', reqObj, true, (irReturnData, irReturnError) => {
8454
7327
  // if we received an error or their is no response on the results
8455
7328
  // return an error
8456
7329
  if (irReturnError) {
@@ -8520,7 +7393,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8520
7393
  const meth = 'adapter-listTrafficPolicyInstancesByHostedZoneSTSRole';
8521
7394
  const origin = `${this.id}-${meth}`;
8522
7395
  log.trace(origin);
8523
- const restVer = this.allProps.aws_ver;
8524
7396
 
8525
7397
  if (this.suspended && this.suspendMode === 'error') {
8526
7398
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8538,7 +7410,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8538
7410
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8539
7411
  const queryParamsAvailable = { id, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
8540
7412
  const queryParams = {};
8541
- const pathVars = [restVer];
7413
+ const pathVars = [];
8542
7414
  const bodyVars = {};
8543
7415
 
8544
7416
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8549,35 +7421,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8549
7421
  }
8550
7422
  });
8551
7423
 
8552
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8553
- let thisHeaderData = null;
8554
- // if the additional headers was passed in as a string parse the json into an object
8555
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8556
- try {
8557
- // parse the additional headers object that was passed in
8558
- thisHeaderData = JSON.parse(thisHeaderData);
8559
- } catch (err) {
8560
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8561
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8562
- return callback(null, errorObj);
8563
- }
8564
- } else if (thisHeaderData === null) {
8565
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8566
- }
8567
-
8568
7424
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8569
7425
  // see adapter code documentation for more information on the request object's fields
8570
7426
  const reqObj = {
8571
7427
  payload: bodyVars,
8572
7428
  uriPathVars: pathVars,
8573
7429
  uriQuery: queryParams,
8574
- addlHeaders: thisHeaderData
7430
+ authData: {
7431
+ stsParams,
7432
+ roleName
7433
+ }
8575
7434
  };
8576
7435
 
8577
7436
  try {
8578
7437
  // Make the call -
8579
7438
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8580
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTrafficPolicyInstancesByHostedZone', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstances/hostedzone?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7439
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstancesByHostedZone', reqObj, true, (irReturnData, irReturnError) => {
8581
7440
  // if we received an error or their is no response on the results
8582
7441
  // return an error
8583
7442
  if (irReturnError) {
@@ -8651,7 +7510,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8651
7510
  const meth = 'adapter-listTrafficPolicyInstancesByPolicySTSRole';
8652
7511
  const origin = `${this.id}-${meth}`;
8653
7512
  log.trace(origin);
8654
- const restVer = this.allProps.aws_ver;
8655
7513
 
8656
7514
  if (this.suspended && this.suspendMode === 'error') {
8657
7515
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8674,7 +7532,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8674
7532
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8675
7533
  const queryParamsAvailable = { id, version, hostedzoneid, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
8676
7534
  const queryParams = {};
8677
- const pathVars = [restVer];
7535
+ const pathVars = [];
8678
7536
  const bodyVars = {};
8679
7537
 
8680
7538
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8685,35 +7543,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8685
7543
  }
8686
7544
  });
8687
7545
 
8688
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8689
- let thisHeaderData = null;
8690
- // if the additional headers was passed in as a string parse the json into an object
8691
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8692
- try {
8693
- // parse the additional headers object that was passed in
8694
- thisHeaderData = JSON.parse(thisHeaderData);
8695
- } catch (err) {
8696
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8697
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8698
- return callback(null, errorObj);
8699
- }
8700
- } else if (thisHeaderData === null) {
8701
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8702
- }
8703
-
8704
7546
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8705
7547
  // see adapter code documentation for more information on the request object's fields
8706
7548
  const reqObj = {
8707
7549
  payload: bodyVars,
8708
7550
  uriPathVars: pathVars,
8709
7551
  uriQuery: queryParams,
8710
- addlHeaders: thisHeaderData
7552
+ authData: {
7553
+ stsParams,
7554
+ roleName
7555
+ }
8711
7556
  };
8712
7557
 
8713
7558
  try {
8714
7559
  // Make the call -
8715
7560
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8716
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTrafficPolicyInstancesByPolicy', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicyinstances/trafficpolicy?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7561
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstancesByPolicy', reqObj, true, (irReturnData, irReturnError) => {
8717
7562
  // if we received an error or their is no response on the results
8718
7563
  // return an error
8719
7564
  if (irReturnError) {
@@ -8781,7 +7626,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8781
7626
  const meth = 'adapter-listTrafficPolicyVersionsSTSRole';
8782
7627
  const origin = `${this.id}-${meth}`;
8783
7628
  log.trace(origin);
8784
- const restVer = this.allProps.aws_ver;
8785
7629
 
8786
7630
  if (this.suspended && this.suspendMode === 'error') {
8787
7631
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8799,7 +7643,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8799
7643
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8800
7644
  const queryParamsAvailable = { trafficpolicyversion, maxitems };
8801
7645
  const queryParams = {};
8802
- const pathVars = [restVer, id];
7646
+ const pathVars = [id];
8803
7647
  const bodyVars = {};
8804
7648
 
8805
7649
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8810,35 +7654,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8810
7654
  }
8811
7655
  });
8812
7656
 
8813
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8814
- let thisHeaderData = null;
8815
- // if the additional headers was passed in as a string parse the json into an object
8816
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8817
- try {
8818
- // parse the additional headers object that was passed in
8819
- thisHeaderData = JSON.parse(thisHeaderData);
8820
- } catch (err) {
8821
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8822
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8823
- return callback(null, errorObj);
8824
- }
8825
- } else if (thisHeaderData === null) {
8826
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8827
- }
8828
-
8829
7657
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8830
7658
  // see adapter code documentation for more information on the request object's fields
8831
7659
  const reqObj = {
8832
7660
  payload: bodyVars,
8833
7661
  uriPathVars: pathVars,
8834
7662
  uriQuery: queryParams,
8835
- addlHeaders: thisHeaderData
7663
+ authData: {
7664
+ stsParams,
7665
+ roleName
7666
+ }
8836
7667
  };
8837
7668
 
8838
7669
  try {
8839
7670
  // Make the call -
8840
7671
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8841
- return this.getAuthorizationAndIdentifyRequest('Rest', 'listTrafficPolicyVersions', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/trafficpolicies/${id}/versions?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7672
+ return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyVersions', reqObj, true, (irReturnData, irReturnError) => {
8842
7673
  // if we received an error or their is no response on the results
8843
7674
  // return an error
8844
7675
  if (irReturnError) {
@@ -8912,7 +7743,6 @@ class AmazonRoute53 extends AdapterBaseCl {
8912
7743
  const meth = 'adapter-testDNSAnswerSTSRole';
8913
7744
  const origin = `${this.id}-${meth}`;
8914
7745
  log.trace(origin);
8915
- const restVer = this.allProps.aws_ver;
8916
7746
 
8917
7747
  if (this.suspended && this.suspendMode === 'error') {
8918
7748
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
@@ -8940,7 +7770,7 @@ class AmazonRoute53 extends AdapterBaseCl {
8940
7770
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
8941
7771
  const queryParamsAvailable = { hostedzoneid, recordname, recordtype, resolverip, edns0clientsubnetip, edns0clientsubnetmask };
8942
7772
  const queryParams = {};
8943
- const pathVars = [restVer];
7773
+ const pathVars = [];
8944
7774
  const bodyVars = {};
8945
7775
 
8946
7776
  // loop in template. long callback arg name to avoid identifier conflicts
@@ -8951,35 +7781,22 @@ class AmazonRoute53 extends AdapterBaseCl {
8951
7781
  }
8952
7782
  });
8953
7783
 
8954
- // if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
8955
- let thisHeaderData = null;
8956
- // if the additional headers was passed in as a string parse the json into an object
8957
- if (thisHeaderData !== null && thisHeaderData.constructor === String) {
8958
- try {
8959
- // parse the additional headers object that was passed in
8960
- thisHeaderData = JSON.parse(thisHeaderData);
8961
- } catch (err) {
8962
- const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
8963
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8964
- return callback(null, errorObj);
8965
- }
8966
- } else if (thisHeaderData === null) {
8967
- thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
8968
- }
8969
-
8970
7784
  // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
8971
7785
  // see adapter code documentation for more information on the request object's fields
8972
7786
  const reqObj = {
8973
7787
  payload: bodyVars,
8974
7788
  uriPathVars: pathVars,
8975
7789
  uriQuery: queryParams,
8976
- addlHeaders: thisHeaderData
7790
+ authData: {
7791
+ stsParams,
7792
+ roleName
7793
+ }
8977
7794
  };
8978
7795
 
8979
7796
  try {
8980
7797
  // Make the call -
8981
7798
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
8982
- return this.getAuthorizationAndIdentifyRequest('Rest', 'testDNSAnswer', reqObj, true, `${this.allProps.base_path}/${this.allProps.version}/${restVer}/testdnsanswer?${querystring.stringify(queryParams)}`, stsParams, roleName, (irReturnData, irReturnError) => {
7799
+ return this.requestHandlerInst.identifyRequest('Rest', 'testDNSAnswer', reqObj, true, (irReturnData, irReturnError) => {
8983
7800
  // if we received an error or their is no response on the results
8984
7801
  // return an error
8985
7802
  if (irReturnError) {