@itentialopensource/adapter-amazon_route53 0.2.1 → 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.
- package/AUTH.md +25 -22
- package/CALLS.md +59 -22
- package/CHANGELOG.md +40 -2
- package/CONTRIBUTING.md +1 -160
- package/ENHANCE.md +2 -2
- package/README.md +32 -23
- package/SYSTEMINFO.md +15 -5
- package/adapter.js +601 -1773
- package/adapterBase.js +549 -879
- package/changelogs/changelog.md +54 -0
- package/entities/.system/action.json +2 -2
- package/entities/Rest/action.json +109 -109
- package/metadata.json +70 -0
- package/package.json +24 -28
- package/pronghorn.json +981 -642
- package/propertiesSchema.json +439 -39
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +15721 -0
- package/report/adapter-openapi.yaml +11633 -0
- package/report/adapterInfo.json +8 -8
- package/report/updateReport1691507399893.json +120 -0
- package/report/updateReport1692202434448.json +120 -0
- package/report/updateReport1694460669097.json +120 -0
- package/report/updateReport1698420502742.json +120 -0
- package/sampleProperties.json +68 -5
- package/test/integration/adapterTestBasicGet.js +2 -4
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +130 -2
- package/test/unit/adapterBaseTestUnit.js +388 -313
- package/test/unit/adapterTestUnit.js +338 -112
- package/utils/adapterInfo.js +1 -1
- package/utils/addAuth.js +1 -1
- package/utils/artifactize.js +1 -1
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +2 -2
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +13 -15
- package/utils/packModificationScript.js +1 -1
- package/utils/pre-commit.sh +2 -0
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +89 -34
- package/utils/tbUtils.js +41 -21
- package/utils/testRunner.js +1 -1
- package/utils/troubleshootingAdapter.js +9 -6
- 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
|
|
|
@@ -31,7 +37,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
31
37
|
// Instantiate the AdapterBase super class
|
|
32
38
|
super(prongid, properties);
|
|
33
39
|
|
|
34
|
-
const restFunctionNames = this.
|
|
40
|
+
const restFunctionNames = this.iapGetAdapterWorkflowFunctions();
|
|
35
41
|
|
|
36
42
|
// Dynamically bind emit functions
|
|
37
43
|
for (let i = 0; i < restFunctionNames.length; i += 1) {
|
|
@@ -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
|
|
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
|
|
307
|
+
* @summary Deactivate adapter tasks
|
|
304
308
|
*
|
|
305
|
-
* @function
|
|
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 {
|
|
310
|
-
*
|
|
311
|
+
* @param {Array} tasks - List of tasks to deactivate
|
|
312
|
+
* @param {Callback} callback
|
|
311
313
|
*/
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
+
iapDeactivateTasks(tasks, callback) {
|
|
315
|
+
const meth = 'adapter-iapDeactivateTasks';
|
|
316
|
+
const origin = `${this.id}-${meth}`;
|
|
314
317
|
log.trace(origin);
|
|
315
318
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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
|
|
323
|
-
* whether the adapter supports type, action and specific entity
|
|
328
|
+
* @summary Activate adapter tasks that have previously been deactivated
|
|
324
329
|
*
|
|
325
|
-
* @function
|
|
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 {
|
|
331
|
-
*
|
|
332
|
+
* @param {Array} tasks - List of tasks to activate
|
|
333
|
+
* @param {Callback} callback
|
|
332
334
|
*/
|
|
333
|
-
|
|
334
|
-
const meth = '
|
|
335
|
+
iapActivateTasks(tasks, callback) {
|
|
336
|
+
const meth = 'adapter-iapActivateTasks';
|
|
335
337
|
const origin = `${this.id}-${meth}`;
|
|
336
338
|
log.trace(origin);
|
|
337
339
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
458
|
-
const
|
|
379
|
+
iapRetrieveEntitiesCache(entityType, options, callback) {
|
|
380
|
+
const meth = 'adapter-iapCheckEiapRetrieveEntitiesCachentityCached';
|
|
381
|
+
const origin = `${this.id}-${meth}`;
|
|
459
382
|
log.trace(origin);
|
|
460
383
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
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
|
-
|
|
775
|
-
const queryParamsAvailable = queryData;
|
|
776
|
-
const queryParams = {};
|
|
777
|
-
const bodyVars = requestBody;
|
|
635
|
+
}
|
|
778
636
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
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
|
-
|
|
788
|
-
|
|
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
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
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
|
-
|
|
815
|
-
|
|
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
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
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
|
-
|
|
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,129 +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.authentication.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
|
-
const tokenKey = response.body;
|
|
977
|
-
const toptions = {
|
|
978
|
-
method: 'GET',
|
|
979
|
-
url: `http://169.254.169.254/latest/meta-data/iam/security-credentials/${roleName}`,
|
|
980
|
-
headers: {
|
|
981
|
-
'X-aws-ec2-metadata-token': tokenKey
|
|
982
|
-
}
|
|
983
|
-
};
|
|
984
|
-
log.info(toptions);
|
|
985
|
-
return requestCall(toptions, (error2, response2) => {
|
|
986
|
-
if (error2) {
|
|
987
|
-
return callback(null, error2);
|
|
988
|
-
}
|
|
989
|
-
const awsResponse = JSON.parse(response2.body);
|
|
990
|
-
const accessKeyId = awsResponse.AccessKeyId;
|
|
991
|
-
const secretAccessKey = awsResponse.SecretAccessKey;
|
|
992
|
-
const sessionToken = awsResponse.Token;
|
|
993
|
-
const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey });
|
|
994
|
-
if (sessionToken) {
|
|
995
|
-
authOpts.headers['X-Amz-Security-Token'] = sessionToken;
|
|
996
|
-
}
|
|
997
|
-
// return the headers
|
|
998
|
-
return callback(authOpts.headers);
|
|
999
|
-
});
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
706
|
/**
|
|
1004
707
|
* @summary wrapper for identifyRequest which sets up the necessary AWS authentication headers first
|
|
1005
708
|
*
|
|
@@ -1019,14 +722,35 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1019
722
|
const meth = 'adapter-getAuthorizationAndIdentifyRequest';
|
|
1020
723
|
const origin = `${this.id}-${meth}`;
|
|
1021
724
|
log.trace(origin);
|
|
725
|
+
let querySchema = null;
|
|
1022
726
|
|
|
1023
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
|
+
|
|
1024
748
|
// using this for method now - would like to use for path in the future
|
|
1025
749
|
const entitySchema = this.requestHandlerInst.propUtil.getEntitySchemaFromFS(entity, action);
|
|
1026
750
|
// thisPath = this.requestHandlerInst.restHandler.buildRequestPath(); - Needs to be exposed
|
|
1027
751
|
|
|
1028
752
|
// Call to get the signature for the call
|
|
1029
|
-
return this.
|
|
753
|
+
return this.requestHandlerInst.getAWSAuthorization(entitySchema.method, requestObj, uriPathTranslated, 'route53', stsParams, roleName, (signature, sigerr) => {
|
|
1030
754
|
if (sigerr) {
|
|
1031
755
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Can not Authenticate ${sigerr}`, [], null, null, null);
|
|
1032
756
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
@@ -1087,7 +811,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1087
811
|
const meth = 'adapter-activateKeySigningKeySTSRole';
|
|
1088
812
|
const origin = `${this.id}-${meth}`;
|
|
1089
813
|
log.trace(origin);
|
|
1090
|
-
const restVer = this.allProps.aws_ver;
|
|
1091
814
|
|
|
1092
815
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1093
816
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1110,7 +833,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1110
833
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1111
834
|
const queryParamsAvailable = {};
|
|
1112
835
|
const queryParams = {};
|
|
1113
|
-
const pathVars = [
|
|
836
|
+
const pathVars = [hostedZoneId, name];
|
|
1114
837
|
const bodyVars = '';
|
|
1115
838
|
|
|
1116
839
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1121,35 +844,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1121
844
|
}
|
|
1122
845
|
});
|
|
1123
846
|
|
|
1124
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1125
|
-
let thisHeaderData = null;
|
|
1126
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1127
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1128
|
-
try {
|
|
1129
|
-
// parse the additional headers object that was passed in
|
|
1130
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1131
|
-
} catch (err) {
|
|
1132
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1133
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1134
|
-
return callback(null, errorObj);
|
|
1135
|
-
}
|
|
1136
|
-
} else if (thisHeaderData === null) {
|
|
1137
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
847
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1141
848
|
// see adapter code documentation for more information on the request object's fields
|
|
1142
849
|
const reqObj = {
|
|
1143
850
|
payload: bodyVars,
|
|
1144
851
|
uriPathVars: pathVars,
|
|
1145
852
|
uriQuery: queryParams,
|
|
1146
|
-
|
|
853
|
+
authData: {
|
|
854
|
+
stsParams,
|
|
855
|
+
roleName
|
|
856
|
+
}
|
|
1147
857
|
};
|
|
1148
858
|
|
|
1149
859
|
try {
|
|
1150
860
|
// Make the call -
|
|
1151
861
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1152
|
-
return this.
|
|
862
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'activateKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
|
|
1153
863
|
// if we received an error or their is no response on the results
|
|
1154
864
|
// return an error
|
|
1155
865
|
if (irReturnError) {
|
|
@@ -1215,7 +925,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1215
925
|
const meth = 'adapter-associateVPCWithHostedZoneSTSRole';
|
|
1216
926
|
const origin = `${this.id}-${meth}`;
|
|
1217
927
|
log.trace(origin);
|
|
1218
|
-
const restVer = this.allProps.aws_ver;
|
|
1219
928
|
|
|
1220
929
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1221
930
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1238,7 +947,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1238
947
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1239
948
|
const queryParamsAvailable = {};
|
|
1240
949
|
const queryParams = {};
|
|
1241
|
-
const pathVars = [
|
|
950
|
+
const pathVars = [id];
|
|
1242
951
|
const bodyVars = body;
|
|
1243
952
|
|
|
1244
953
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1249,35 +958,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1249
958
|
}
|
|
1250
959
|
});
|
|
1251
960
|
|
|
1252
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1253
|
-
let thisHeaderData = null;
|
|
1254
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1255
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1256
|
-
try {
|
|
1257
|
-
// parse the additional headers object that was passed in
|
|
1258
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1259
|
-
} catch (err) {
|
|
1260
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1261
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1262
|
-
return callback(null, errorObj);
|
|
1263
|
-
}
|
|
1264
|
-
} else if (thisHeaderData === null) {
|
|
1265
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
961
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1269
962
|
// see adapter code documentation for more information on the request object's fields
|
|
1270
963
|
const reqObj = {
|
|
1271
964
|
payload: bodyVars,
|
|
1272
965
|
uriPathVars: pathVars,
|
|
1273
966
|
uriQuery: queryParams,
|
|
1274
|
-
|
|
967
|
+
authData: {
|
|
968
|
+
stsParams,
|
|
969
|
+
roleName
|
|
970
|
+
}
|
|
1275
971
|
};
|
|
1276
972
|
|
|
1277
973
|
try {
|
|
1278
974
|
// Make the call -
|
|
1279
975
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1280
|
-
return this.
|
|
976
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'associateVPCWithHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
1281
977
|
// if we received an error or their is no response on the results
|
|
1282
978
|
// return an error
|
|
1283
979
|
if (irReturnError) {
|
|
@@ -1343,7 +1039,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1343
1039
|
const meth = 'adapter-changeResourceRecordSetsSTSRole';
|
|
1344
1040
|
const origin = `${this.id}-${meth}`;
|
|
1345
1041
|
log.trace(origin);
|
|
1346
|
-
const restVer = this.allProps.aws_ver;
|
|
1347
1042
|
|
|
1348
1043
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1349
1044
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1366,7 +1061,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1366
1061
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1367
1062
|
const queryParamsAvailable = {};
|
|
1368
1063
|
const queryParams = {};
|
|
1369
|
-
const pathVars = [
|
|
1064
|
+
const pathVars = [id];
|
|
1370
1065
|
const bodyVars = body;
|
|
1371
1066
|
|
|
1372
1067
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1377,35 +1072,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1377
1072
|
}
|
|
1378
1073
|
});
|
|
1379
1074
|
|
|
1380
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1381
|
-
let thisHeaderData = null;
|
|
1382
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1383
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1384
|
-
try {
|
|
1385
|
-
// parse the additional headers object that was passed in
|
|
1386
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1387
|
-
} catch (err) {
|
|
1388
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1389
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1390
|
-
return callback(null, errorObj);
|
|
1391
|
-
}
|
|
1392
|
-
} else if (thisHeaderData === null) {
|
|
1393
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
1075
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1397
1076
|
// see adapter code documentation for more information on the request object's fields
|
|
1398
1077
|
const reqObj = {
|
|
1399
1078
|
payload: bodyVars,
|
|
1400
1079
|
uriPathVars: pathVars,
|
|
1401
1080
|
uriQuery: queryParams,
|
|
1402
|
-
|
|
1081
|
+
authData: {
|
|
1082
|
+
stsParams,
|
|
1083
|
+
roleName
|
|
1084
|
+
}
|
|
1403
1085
|
};
|
|
1404
1086
|
|
|
1405
1087
|
try {
|
|
1406
1088
|
// Make the call -
|
|
1407
1089
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1408
|
-
return this.
|
|
1090
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
|
|
1409
1091
|
// if we received an error or their is no response on the results
|
|
1410
1092
|
// return an error
|
|
1411
1093
|
if (irReturnError) {
|
|
@@ -1473,7 +1155,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1473
1155
|
const meth = 'adapter-changeTagsForResourceSTSRole';
|
|
1474
1156
|
const origin = `${this.id}-${meth}`;
|
|
1475
1157
|
log.trace(origin);
|
|
1476
|
-
const restVer = this.allProps.aws_ver;
|
|
1477
1158
|
|
|
1478
1159
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1479
1160
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1501,7 +1182,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1501
1182
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1502
1183
|
const queryParamsAvailable = {};
|
|
1503
1184
|
const queryParams = {};
|
|
1504
|
-
const pathVars = [
|
|
1185
|
+
const pathVars = [resourceType, resourceId];
|
|
1505
1186
|
const bodyVars = body;
|
|
1506
1187
|
|
|
1507
1188
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1512,35 +1193,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1512
1193
|
}
|
|
1513
1194
|
});
|
|
1514
1195
|
|
|
1515
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1516
|
-
let thisHeaderData = null;
|
|
1517
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1518
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1519
|
-
try {
|
|
1520
|
-
// parse the additional headers object that was passed in
|
|
1521
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1522
|
-
} catch (err) {
|
|
1523
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1524
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1525
|
-
return callback(null, errorObj);
|
|
1526
|
-
}
|
|
1527
|
-
} else if (thisHeaderData === null) {
|
|
1528
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
1196
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1532
1197
|
// see adapter code documentation for more information on the request object's fields
|
|
1533
1198
|
const reqObj = {
|
|
1534
1199
|
payload: bodyVars,
|
|
1535
1200
|
uriPathVars: pathVars,
|
|
1536
1201
|
uriQuery: queryParams,
|
|
1537
|
-
|
|
1202
|
+
authData: {
|
|
1203
|
+
stsParams,
|
|
1204
|
+
roleName
|
|
1205
|
+
}
|
|
1538
1206
|
};
|
|
1539
1207
|
|
|
1540
1208
|
try {
|
|
1541
1209
|
// Make the call -
|
|
1542
1210
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1543
|
-
return this.
|
|
1211
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'changeTagsForResource', reqObj, true, (irReturnData, irReturnError) => {
|
|
1544
1212
|
// if we received an error or their is no response on the results
|
|
1545
1213
|
// return an error
|
|
1546
1214
|
if (irReturnError) {
|
|
@@ -1606,7 +1274,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1606
1274
|
const meth = 'adapter-listTagsForResourceSTSRole';
|
|
1607
1275
|
const origin = `${this.id}-${meth}`;
|
|
1608
1276
|
log.trace(origin);
|
|
1609
|
-
const restVer = this.allProps.aws_ver;
|
|
1610
1277
|
|
|
1611
1278
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1612
1279
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1629,7 +1296,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1629
1296
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1630
1297
|
const queryParamsAvailable = {};
|
|
1631
1298
|
const queryParams = {};
|
|
1632
|
-
const pathVars = [
|
|
1299
|
+
const pathVars = [resourceType, resourceId];
|
|
1633
1300
|
const bodyVars = {};
|
|
1634
1301
|
|
|
1635
1302
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1640,35 +1307,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1640
1307
|
}
|
|
1641
1308
|
});
|
|
1642
1309
|
|
|
1643
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1644
|
-
let thisHeaderData = null;
|
|
1645
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1646
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1647
|
-
try {
|
|
1648
|
-
// parse the additional headers object that was passed in
|
|
1649
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1650
|
-
} catch (err) {
|
|
1651
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1652
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1653
|
-
return callback(null, errorObj);
|
|
1654
|
-
}
|
|
1655
|
-
} else if (thisHeaderData === null) {
|
|
1656
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
1310
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1660
1311
|
// see adapter code documentation for more information on the request object's fields
|
|
1661
1312
|
const reqObj = {
|
|
1662
1313
|
payload: bodyVars,
|
|
1663
1314
|
uriPathVars: pathVars,
|
|
1664
1315
|
uriQuery: queryParams,
|
|
1665
|
-
|
|
1316
|
+
authData: {
|
|
1317
|
+
stsParams,
|
|
1318
|
+
roleName
|
|
1319
|
+
}
|
|
1666
1320
|
};
|
|
1667
1321
|
|
|
1668
1322
|
try {
|
|
1669
1323
|
// Make the call -
|
|
1670
1324
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1671
|
-
return this.
|
|
1325
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTagsForResource', reqObj, true, (irReturnData, irReturnError) => {
|
|
1672
1326
|
// if we received an error or their is no response on the results
|
|
1673
1327
|
// return an error
|
|
1674
1328
|
if (irReturnError) {
|
|
@@ -1732,7 +1386,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1732
1386
|
const meth = 'adapter-createHealthCheckSTSRole';
|
|
1733
1387
|
const origin = `${this.id}-${meth}`;
|
|
1734
1388
|
log.trace(origin);
|
|
1735
|
-
const restVer = this.allProps.aws_ver;
|
|
1736
1389
|
|
|
1737
1390
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1738
1391
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1750,7 +1403,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1750
1403
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1751
1404
|
const queryParamsAvailable = {};
|
|
1752
1405
|
const queryParams = {};
|
|
1753
|
-
const pathVars = [
|
|
1406
|
+
const pathVars = [];
|
|
1754
1407
|
const bodyVars = body;
|
|
1755
1408
|
|
|
1756
1409
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1761,35 +1414,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1761
1414
|
}
|
|
1762
1415
|
});
|
|
1763
1416
|
|
|
1764
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1765
|
-
let thisHeaderData = null;
|
|
1766
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1767
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1768
|
-
try {
|
|
1769
|
-
// parse the additional headers object that was passed in
|
|
1770
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1771
|
-
} catch (err) {
|
|
1772
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1773
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1774
|
-
return callback(null, errorObj);
|
|
1775
|
-
}
|
|
1776
|
-
} else if (thisHeaderData === null) {
|
|
1777
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
1417
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1781
1418
|
// see adapter code documentation for more information on the request object's fields
|
|
1782
1419
|
const reqObj = {
|
|
1783
1420
|
payload: bodyVars,
|
|
1784
1421
|
uriPathVars: pathVars,
|
|
1785
1422
|
uriQuery: queryParams,
|
|
1786
|
-
|
|
1423
|
+
authData: {
|
|
1424
|
+
stsParams,
|
|
1425
|
+
roleName
|
|
1426
|
+
}
|
|
1787
1427
|
};
|
|
1788
1428
|
|
|
1789
1429
|
try {
|
|
1790
1430
|
// Make the call -
|
|
1791
1431
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1792
|
-
return this.
|
|
1432
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
|
|
1793
1433
|
// if we received an error or their is no response on the results
|
|
1794
1434
|
// return an error
|
|
1795
1435
|
if (irReturnError) {
|
|
@@ -1859,7 +1499,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1859
1499
|
const meth = 'adapter-listHealthChecksSTSRole';
|
|
1860
1500
|
const origin = `${this.id}-${meth}`;
|
|
1861
1501
|
log.trace(origin);
|
|
1862
|
-
const restVer = this.allProps.aws_ver;
|
|
1863
1502
|
|
|
1864
1503
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1865
1504
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1872,7 +1511,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1872
1511
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1873
1512
|
const queryParamsAvailable = { marker, maxitems, maxItems, markerQuery };
|
|
1874
1513
|
const queryParams = {};
|
|
1875
|
-
const pathVars = [
|
|
1514
|
+
const pathVars = [];
|
|
1876
1515
|
const bodyVars = {};
|
|
1877
1516
|
|
|
1878
1517
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -1883,35 +1522,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1883
1522
|
}
|
|
1884
1523
|
});
|
|
1885
1524
|
|
|
1886
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
1887
|
-
let thisHeaderData = null;
|
|
1888
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
1889
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
1890
|
-
try {
|
|
1891
|
-
// parse the additional headers object that was passed in
|
|
1892
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
1893
|
-
} catch (err) {
|
|
1894
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
1895
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
1896
|
-
return callback(null, errorObj);
|
|
1897
|
-
}
|
|
1898
|
-
} else if (thisHeaderData === null) {
|
|
1899
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
1525
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
1903
1526
|
// see adapter code documentation for more information on the request object's fields
|
|
1904
1527
|
const reqObj = {
|
|
1905
1528
|
payload: bodyVars,
|
|
1906
1529
|
uriPathVars: pathVars,
|
|
1907
1530
|
uriQuery: queryParams,
|
|
1908
|
-
|
|
1531
|
+
authData: {
|
|
1532
|
+
stsParams,
|
|
1533
|
+
roleName
|
|
1534
|
+
}
|
|
1909
1535
|
};
|
|
1910
1536
|
|
|
1911
1537
|
try {
|
|
1912
1538
|
// Make the call -
|
|
1913
1539
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
1914
|
-
return this.
|
|
1540
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listHealthChecks', reqObj, true, (irReturnData, irReturnError) => {
|
|
1915
1541
|
// if we received an error or their is no response on the results
|
|
1916
1542
|
// return an error
|
|
1917
1543
|
if (irReturnError) {
|
|
@@ -1975,7 +1601,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1975
1601
|
const meth = 'adapter-createHostedZoneSTSRole';
|
|
1976
1602
|
const origin = `${this.id}-${meth}`;
|
|
1977
1603
|
log.trace(origin);
|
|
1978
|
-
const restVer = this.allProps.aws_ver;
|
|
1979
1604
|
|
|
1980
1605
|
if (this.suspended && this.suspendMode === 'error') {
|
|
1981
1606
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -1993,7 +1618,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
1993
1618
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1994
1619
|
const queryParamsAvailable = {};
|
|
1995
1620
|
const queryParams = {};
|
|
1996
|
-
const pathVars = [
|
|
1621
|
+
const pathVars = [];
|
|
1997
1622
|
const bodyVars = body;
|
|
1998
1623
|
|
|
1999
1624
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2004,35 +1629,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2004
1629
|
}
|
|
2005
1630
|
});
|
|
2006
1631
|
|
|
2007
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2008
|
-
let thisHeaderData = null;
|
|
2009
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2010
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2011
|
-
try {
|
|
2012
|
-
// parse the additional headers object that was passed in
|
|
2013
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2014
|
-
} catch (err) {
|
|
2015
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2016
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2017
|
-
return callback(null, errorObj);
|
|
2018
|
-
}
|
|
2019
|
-
} else if (thisHeaderData === null) {
|
|
2020
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
1632
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2024
1633
|
// see adapter code documentation for more information on the request object's fields
|
|
2025
1634
|
const reqObj = {
|
|
2026
1635
|
payload: bodyVars,
|
|
2027
1636
|
uriPathVars: pathVars,
|
|
2028
1637
|
uriQuery: queryParams,
|
|
2029
|
-
|
|
1638
|
+
authData: {
|
|
1639
|
+
stsParams,
|
|
1640
|
+
roleName
|
|
1641
|
+
}
|
|
2030
1642
|
};
|
|
2031
1643
|
|
|
2032
1644
|
try {
|
|
2033
1645
|
// Make the call -
|
|
2034
1646
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2035
|
-
return this.
|
|
1647
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
2036
1648
|
// if we received an error or their is no response on the results
|
|
2037
1649
|
// return an error
|
|
2038
1650
|
if (irReturnError) {
|
|
@@ -2104,7 +1716,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2104
1716
|
const meth = 'adapter-listHostedZonesSTSRole';
|
|
2105
1717
|
const origin = `${this.id}-${meth}`;
|
|
2106
1718
|
log.trace(origin);
|
|
2107
|
-
const restVer = this.allProps.aws_ver;
|
|
2108
1719
|
|
|
2109
1720
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2110
1721
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2117,7 +1728,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2117
1728
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2118
1729
|
const queryParamsAvailable = { marker, maxitems, delegationsetid, maxItems, markerQuery };
|
|
2119
1730
|
const queryParams = {};
|
|
2120
|
-
const pathVars = [
|
|
1731
|
+
const pathVars = [];
|
|
2121
1732
|
const bodyVars = {};
|
|
2122
1733
|
|
|
2123
1734
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2128,35 +1739,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2128
1739
|
}
|
|
2129
1740
|
});
|
|
2130
1741
|
|
|
2131
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2132
|
-
let thisHeaderData = null;
|
|
2133
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2134
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2135
|
-
try {
|
|
2136
|
-
// parse the additional headers object that was passed in
|
|
2137
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2138
|
-
} catch (err) {
|
|
2139
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2140
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2141
|
-
return callback(null, errorObj);
|
|
2142
|
-
}
|
|
2143
|
-
} else if (thisHeaderData === null) {
|
|
2144
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
1742
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2148
1743
|
// see adapter code documentation for more information on the request object's fields
|
|
2149
1744
|
const reqObj = {
|
|
2150
1745
|
payload: bodyVars,
|
|
2151
1746
|
uriPathVars: pathVars,
|
|
2152
1747
|
uriQuery: queryParams,
|
|
2153
|
-
|
|
1748
|
+
authData: {
|
|
1749
|
+
stsParams,
|
|
1750
|
+
roleName
|
|
1751
|
+
}
|
|
2154
1752
|
};
|
|
2155
1753
|
|
|
2156
1754
|
try {
|
|
2157
1755
|
// Make the call -
|
|
2158
1756
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2159
|
-
return this.
|
|
1757
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZones', reqObj, true, (irReturnData, irReturnError) => {
|
|
2160
1758
|
// if we received an error or their is no response on the results
|
|
2161
1759
|
// return an error
|
|
2162
1760
|
if (irReturnError) {
|
|
@@ -2220,7 +1818,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2220
1818
|
const meth = 'adapter-createKeySigningKeySTSRole';
|
|
2221
1819
|
const origin = `${this.id}-${meth}`;
|
|
2222
1820
|
log.trace(origin);
|
|
2223
|
-
const restVer = this.allProps.aws_ver;
|
|
2224
1821
|
|
|
2225
1822
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2226
1823
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2238,7 +1835,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2238
1835
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2239
1836
|
const queryParamsAvailable = {};
|
|
2240
1837
|
const queryParams = {};
|
|
2241
|
-
const pathVars = [
|
|
1838
|
+
const pathVars = [];
|
|
2242
1839
|
const bodyVars = body;
|
|
2243
1840
|
|
|
2244
1841
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2249,35 +1846,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2249
1846
|
}
|
|
2250
1847
|
});
|
|
2251
1848
|
|
|
2252
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2253
|
-
let thisHeaderData = null;
|
|
2254
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2255
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2256
|
-
try {
|
|
2257
|
-
// parse the additional headers object that was passed in
|
|
2258
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2259
|
-
} catch (err) {
|
|
2260
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2261
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2262
|
-
return callback(null, errorObj);
|
|
2263
|
-
}
|
|
2264
|
-
} else if (thisHeaderData === null) {
|
|
2265
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
1849
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2269
1850
|
// see adapter code documentation for more information on the request object's fields
|
|
2270
1851
|
const reqObj = {
|
|
2271
1852
|
payload: bodyVars,
|
|
2272
1853
|
uriPathVars: pathVars,
|
|
2273
1854
|
uriQuery: queryParams,
|
|
2274
|
-
|
|
1855
|
+
authData: {
|
|
1856
|
+
stsParams,
|
|
1857
|
+
roleName
|
|
1858
|
+
}
|
|
2275
1859
|
};
|
|
2276
1860
|
|
|
2277
1861
|
try {
|
|
2278
1862
|
// Make the call -
|
|
2279
1863
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2280
|
-
return this.
|
|
1864
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
|
|
2281
1865
|
// if we received an error or their is no response on the results
|
|
2282
1866
|
// return an error
|
|
2283
1867
|
if (irReturnError) {
|
|
@@ -2341,7 +1925,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2341
1925
|
const meth = 'adapter-createQueryLoggingConfigSTSRole';
|
|
2342
1926
|
const origin = `${this.id}-${meth}`;
|
|
2343
1927
|
log.trace(origin);
|
|
2344
|
-
const restVer = this.allProps.aws_ver;
|
|
2345
1928
|
|
|
2346
1929
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2347
1930
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2359,7 +1942,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2359
1942
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2360
1943
|
const queryParamsAvailable = {};
|
|
2361
1944
|
const queryParams = {};
|
|
2362
|
-
const pathVars = [
|
|
1945
|
+
const pathVars = [];
|
|
2363
1946
|
const bodyVars = body;
|
|
2364
1947
|
|
|
2365
1948
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2370,35 +1953,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2370
1953
|
}
|
|
2371
1954
|
});
|
|
2372
1955
|
|
|
2373
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2374
|
-
let thisHeaderData = null;
|
|
2375
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2376
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2377
|
-
try {
|
|
2378
|
-
// parse the additional headers object that was passed in
|
|
2379
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2380
|
-
} catch (err) {
|
|
2381
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2382
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2383
|
-
return callback(null, errorObj);
|
|
2384
|
-
}
|
|
2385
|
-
} else if (thisHeaderData === null) {
|
|
2386
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
1956
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2390
1957
|
// see adapter code documentation for more information on the request object's fields
|
|
2391
1958
|
const reqObj = {
|
|
2392
1959
|
payload: bodyVars,
|
|
2393
1960
|
uriPathVars: pathVars,
|
|
2394
1961
|
uriQuery: queryParams,
|
|
2395
|
-
|
|
1962
|
+
authData: {
|
|
1963
|
+
stsParams,
|
|
1964
|
+
roleName
|
|
1965
|
+
}
|
|
2396
1966
|
};
|
|
2397
1967
|
|
|
2398
1968
|
try {
|
|
2399
1969
|
// Make the call -
|
|
2400
1970
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2401
|
-
return this.
|
|
1971
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
|
|
2402
1972
|
// if we received an error or their is no response on the results
|
|
2403
1973
|
// return an error
|
|
2404
1974
|
if (irReturnError) {
|
|
@@ -2470,7 +2040,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2470
2040
|
const meth = 'adapter-listQueryLoggingConfigsSTSRole';
|
|
2471
2041
|
const origin = `${this.id}-${meth}`;
|
|
2472
2042
|
log.trace(origin);
|
|
2473
|
-
const restVer = this.allProps.aws_ver;
|
|
2474
2043
|
|
|
2475
2044
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2476
2045
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2483,7 +2052,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2483
2052
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2484
2053
|
const queryParamsAvailable = { hostedzoneid, nexttoken, maxresults, maxResults, nextToken };
|
|
2485
2054
|
const queryParams = {};
|
|
2486
|
-
const pathVars = [
|
|
2055
|
+
const pathVars = [];
|
|
2487
2056
|
const bodyVars = {};
|
|
2488
2057
|
|
|
2489
2058
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2494,35 +2063,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2494
2063
|
}
|
|
2495
2064
|
});
|
|
2496
2065
|
|
|
2497
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2498
|
-
let thisHeaderData = null;
|
|
2499
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2500
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2501
|
-
try {
|
|
2502
|
-
// parse the additional headers object that was passed in
|
|
2503
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2504
|
-
} catch (err) {
|
|
2505
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2506
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2507
|
-
return callback(null, errorObj);
|
|
2508
|
-
}
|
|
2509
|
-
} else if (thisHeaderData === null) {
|
|
2510
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
2066
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2514
2067
|
// see adapter code documentation for more information on the request object's fields
|
|
2515
2068
|
const reqObj = {
|
|
2516
2069
|
payload: bodyVars,
|
|
2517
2070
|
uriPathVars: pathVars,
|
|
2518
2071
|
uriQuery: queryParams,
|
|
2519
|
-
|
|
2072
|
+
authData: {
|
|
2073
|
+
stsParams,
|
|
2074
|
+
roleName
|
|
2075
|
+
}
|
|
2520
2076
|
};
|
|
2521
2077
|
|
|
2522
2078
|
try {
|
|
2523
2079
|
// Make the call -
|
|
2524
2080
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2525
|
-
return this.
|
|
2081
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listQueryLoggingConfigs', reqObj, true, (irReturnData, irReturnError) => {
|
|
2526
2082
|
// if we received an error or their is no response on the results
|
|
2527
2083
|
// return an error
|
|
2528
2084
|
if (irReturnError) {
|
|
@@ -2586,7 +2142,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2586
2142
|
const meth = 'adapter-createReusableDelegationSetSTSRole';
|
|
2587
2143
|
const origin = `${this.id}-${meth}`;
|
|
2588
2144
|
log.trace(origin);
|
|
2589
|
-
const restVer = this.allProps.aws_ver;
|
|
2590
2145
|
|
|
2591
2146
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2592
2147
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2604,7 +2159,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2604
2159
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2605
2160
|
const queryParamsAvailable = {};
|
|
2606
2161
|
const queryParams = {};
|
|
2607
|
-
const pathVars = [
|
|
2162
|
+
const pathVars = [];
|
|
2608
2163
|
const bodyVars = body;
|
|
2609
2164
|
|
|
2610
2165
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2615,35 +2170,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2615
2170
|
}
|
|
2616
2171
|
});
|
|
2617
2172
|
|
|
2618
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2619
|
-
let thisHeaderData = null;
|
|
2620
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2621
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2622
|
-
try {
|
|
2623
|
-
// parse the additional headers object that was passed in
|
|
2624
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2625
|
-
} catch (err) {
|
|
2626
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2627
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2628
|
-
return callback(null, errorObj);
|
|
2629
|
-
}
|
|
2630
|
-
} else if (thisHeaderData === null) {
|
|
2631
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
2173
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2635
2174
|
// see adapter code documentation for more information on the request object's fields
|
|
2636
2175
|
const reqObj = {
|
|
2637
2176
|
payload: bodyVars,
|
|
2638
2177
|
uriPathVars: pathVars,
|
|
2639
2178
|
uriQuery: queryParams,
|
|
2640
|
-
|
|
2179
|
+
authData: {
|
|
2180
|
+
stsParams,
|
|
2181
|
+
roleName
|
|
2182
|
+
}
|
|
2641
2183
|
};
|
|
2642
2184
|
|
|
2643
2185
|
try {
|
|
2644
2186
|
// Make the call -
|
|
2645
2187
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2646
|
-
return this.
|
|
2188
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
|
|
2647
2189
|
// if we received an error or their is no response on the results
|
|
2648
2190
|
// return an error
|
|
2649
2191
|
if (irReturnError) {
|
|
@@ -2709,7 +2251,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2709
2251
|
const meth = 'adapter-listReusableDelegationSetsSTSRole';
|
|
2710
2252
|
const origin = `${this.id}-${meth}`;
|
|
2711
2253
|
log.trace(origin);
|
|
2712
|
-
const restVer = this.allProps.aws_ver;
|
|
2713
2254
|
|
|
2714
2255
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2715
2256
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2722,7 +2263,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2722
2263
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2723
2264
|
const queryParamsAvailable = { marker, maxitems };
|
|
2724
2265
|
const queryParams = {};
|
|
2725
|
-
const pathVars = [
|
|
2266
|
+
const pathVars = [];
|
|
2726
2267
|
const bodyVars = {};
|
|
2727
2268
|
|
|
2728
2269
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2733,35 +2274,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2733
2274
|
}
|
|
2734
2275
|
});
|
|
2735
2276
|
|
|
2736
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2737
|
-
let thisHeaderData = null;
|
|
2738
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2739
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2740
|
-
try {
|
|
2741
|
-
// parse the additional headers object that was passed in
|
|
2742
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2743
|
-
} catch (err) {
|
|
2744
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2745
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2746
|
-
return callback(null, errorObj);
|
|
2747
|
-
}
|
|
2748
|
-
} else if (thisHeaderData === null) {
|
|
2749
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2752
2277
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2753
2278
|
// see adapter code documentation for more information on the request object's fields
|
|
2754
2279
|
const reqObj = {
|
|
2755
2280
|
payload: bodyVars,
|
|
2756
2281
|
uriPathVars: pathVars,
|
|
2757
2282
|
uriQuery: queryParams,
|
|
2758
|
-
|
|
2283
|
+
authData: {
|
|
2284
|
+
stsParams,
|
|
2285
|
+
roleName
|
|
2286
|
+
}
|
|
2759
2287
|
};
|
|
2760
2288
|
|
|
2761
2289
|
try {
|
|
2762
2290
|
// Make the call -
|
|
2763
2291
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2764
|
-
return this.
|
|
2292
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listReusableDelegationSets', reqObj, true, (irReturnData, irReturnError) => {
|
|
2765
2293
|
// if we received an error or their is no response on the results
|
|
2766
2294
|
// return an error
|
|
2767
2295
|
if (irReturnError) {
|
|
@@ -2825,7 +2353,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2825
2353
|
const meth = 'adapter-createTrafficPolicySTSRole';
|
|
2826
2354
|
const origin = `${this.id}-${meth}`;
|
|
2827
2355
|
log.trace(origin);
|
|
2828
|
-
const restVer = this.allProps.aws_ver;
|
|
2829
2356
|
|
|
2830
2357
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2831
2358
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2843,7 +2370,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2843
2370
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2844
2371
|
const queryParamsAvailable = {};
|
|
2845
2372
|
const queryParams = {};
|
|
2846
|
-
const pathVars = [
|
|
2373
|
+
const pathVars = [];
|
|
2847
2374
|
const bodyVars = body;
|
|
2848
2375
|
|
|
2849
2376
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2854,35 +2381,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2854
2381
|
}
|
|
2855
2382
|
});
|
|
2856
2383
|
|
|
2857
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2858
|
-
let thisHeaderData = null;
|
|
2859
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2860
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2861
|
-
try {
|
|
2862
|
-
// parse the additional headers object that was passed in
|
|
2863
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2864
|
-
} catch (err) {
|
|
2865
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2866
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2867
|
-
return callback(null, errorObj);
|
|
2868
|
-
}
|
|
2869
|
-
} else if (thisHeaderData === null) {
|
|
2870
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2871
|
-
}
|
|
2872
|
-
|
|
2873
2384
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2874
2385
|
// see adapter code documentation for more information on the request object's fields
|
|
2875
2386
|
const reqObj = {
|
|
2876
2387
|
payload: bodyVars,
|
|
2877
2388
|
uriPathVars: pathVars,
|
|
2878
2389
|
uriQuery: queryParams,
|
|
2879
|
-
|
|
2390
|
+
authData: {
|
|
2391
|
+
stsParams,
|
|
2392
|
+
roleName
|
|
2393
|
+
}
|
|
2880
2394
|
};
|
|
2881
2395
|
|
|
2882
2396
|
try {
|
|
2883
2397
|
// Make the call -
|
|
2884
2398
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
2885
|
-
return this.
|
|
2399
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
|
|
2886
2400
|
// if we received an error or their is no response on the results
|
|
2887
2401
|
// return an error
|
|
2888
2402
|
if (irReturnError) {
|
|
@@ -2946,7 +2460,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2946
2460
|
const meth = 'adapter-createTrafficPolicyInstanceSTSRole';
|
|
2947
2461
|
const origin = `${this.id}-${meth}`;
|
|
2948
2462
|
log.trace(origin);
|
|
2949
|
-
const restVer = this.allProps.aws_ver;
|
|
2950
2463
|
|
|
2951
2464
|
if (this.suspended && this.suspendMode === 'error') {
|
|
2952
2465
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -2964,7 +2477,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2964
2477
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2965
2478
|
const queryParamsAvailable = {};
|
|
2966
2479
|
const queryParams = {};
|
|
2967
|
-
const pathVars = [
|
|
2480
|
+
const pathVars = [];
|
|
2968
2481
|
const bodyVars = body;
|
|
2969
2482
|
|
|
2970
2483
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -2975,35 +2488,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
2975
2488
|
}
|
|
2976
2489
|
});
|
|
2977
2490
|
|
|
2978
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
2979
|
-
let thisHeaderData = null;
|
|
2980
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
2981
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
2982
|
-
try {
|
|
2983
|
-
// parse the additional headers object that was passed in
|
|
2984
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
2985
|
-
} catch (err) {
|
|
2986
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
2987
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
2988
|
-
return callback(null, errorObj);
|
|
2989
|
-
}
|
|
2990
|
-
} else if (thisHeaderData === null) {
|
|
2991
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
2992
|
-
}
|
|
2993
|
-
|
|
2994
2491
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
2995
2492
|
// see adapter code documentation for more information on the request object's fields
|
|
2996
2493
|
const reqObj = {
|
|
2997
2494
|
payload: bodyVars,
|
|
2998
2495
|
uriPathVars: pathVars,
|
|
2999
2496
|
uriQuery: queryParams,
|
|
3000
|
-
|
|
2497
|
+
authData: {
|
|
2498
|
+
stsParams,
|
|
2499
|
+
roleName
|
|
2500
|
+
}
|
|
3001
2501
|
};
|
|
3002
2502
|
|
|
3003
2503
|
try {
|
|
3004
2504
|
// Make the call -
|
|
3005
2505
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3006
|
-
return this.
|
|
2506
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
|
|
3007
2507
|
// if we received an error or their is no response on the results
|
|
3008
2508
|
// return an error
|
|
3009
2509
|
if (irReturnError) {
|
|
@@ -3069,7 +2569,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3069
2569
|
const meth = 'adapter-createTrafficPolicyVersionSTSRole';
|
|
3070
2570
|
const origin = `${this.id}-${meth}`;
|
|
3071
2571
|
log.trace(origin);
|
|
3072
|
-
const restVer = this.allProps.aws_ver;
|
|
3073
2572
|
|
|
3074
2573
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3075
2574
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3092,7 +2591,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3092
2591
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3093
2592
|
const queryParamsAvailable = {};
|
|
3094
2593
|
const queryParams = {};
|
|
3095
|
-
const pathVars = [
|
|
2594
|
+
const pathVars = [id];
|
|
3096
2595
|
const bodyVars = body;
|
|
3097
2596
|
|
|
3098
2597
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3103,35 +2602,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3103
2602
|
}
|
|
3104
2603
|
});
|
|
3105
2604
|
|
|
3106
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3107
|
-
let thisHeaderData = null;
|
|
3108
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3109
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3110
|
-
try {
|
|
3111
|
-
// parse the additional headers object that was passed in
|
|
3112
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3113
|
-
} catch (err) {
|
|
3114
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3115
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3116
|
-
return callback(null, errorObj);
|
|
3117
|
-
}
|
|
3118
|
-
} else if (thisHeaderData === null) {
|
|
3119
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
3120
|
-
}
|
|
3121
|
-
|
|
3122
2605
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3123
2606
|
// see adapter code documentation for more information on the request object's fields
|
|
3124
2607
|
const reqObj = {
|
|
3125
2608
|
payload: bodyVars,
|
|
3126
2609
|
uriPathVars: pathVars,
|
|
3127
2610
|
uriQuery: queryParams,
|
|
3128
|
-
|
|
2611
|
+
authData: {
|
|
2612
|
+
stsParams,
|
|
2613
|
+
roleName
|
|
2614
|
+
}
|
|
3129
2615
|
};
|
|
3130
2616
|
|
|
3131
2617
|
try {
|
|
3132
2618
|
// Make the call -
|
|
3133
2619
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3134
|
-
return this.
|
|
2620
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createTrafficPolicyVersion', reqObj, true, (irReturnData, irReturnError) => {
|
|
3135
2621
|
// if we received an error or their is no response on the results
|
|
3136
2622
|
// return an error
|
|
3137
2623
|
if (irReturnError) {
|
|
@@ -3197,7 +2683,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3197
2683
|
const meth = 'adapter-createVPCAssociationAuthorizationSTSRole';
|
|
3198
2684
|
const origin = `${this.id}-${meth}`;
|
|
3199
2685
|
log.trace(origin);
|
|
3200
|
-
const restVer = this.allProps.aws_ver;
|
|
3201
2686
|
|
|
3202
2687
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3203
2688
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3220,7 +2705,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3220
2705
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3221
2706
|
const queryParamsAvailable = {};
|
|
3222
2707
|
const queryParams = {};
|
|
3223
|
-
const pathVars = [
|
|
2708
|
+
const pathVars = [id];
|
|
3224
2709
|
const bodyVars = body;
|
|
3225
2710
|
|
|
3226
2711
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3231,35 +2716,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3231
2716
|
}
|
|
3232
2717
|
});
|
|
3233
2718
|
|
|
3234
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3235
|
-
let thisHeaderData = null;
|
|
3236
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3237
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3238
|
-
try {
|
|
3239
|
-
// parse the additional headers object that was passed in
|
|
3240
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3241
|
-
} catch (err) {
|
|
3242
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3243
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3244
|
-
return callback(null, errorObj);
|
|
3245
|
-
}
|
|
3246
|
-
} else if (thisHeaderData === null) {
|
|
3247
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
3248
|
-
}
|
|
3249
|
-
|
|
3250
2719
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3251
2720
|
// see adapter code documentation for more information on the request object's fields
|
|
3252
2721
|
const reqObj = {
|
|
3253
2722
|
payload: bodyVars,
|
|
3254
2723
|
uriPathVars: pathVars,
|
|
3255
2724
|
uriQuery: queryParams,
|
|
3256
|
-
|
|
2725
|
+
authData: {
|
|
2726
|
+
stsParams,
|
|
2727
|
+
roleName
|
|
2728
|
+
}
|
|
3257
2729
|
};
|
|
3258
2730
|
|
|
3259
2731
|
try {
|
|
3260
2732
|
// Make the call -
|
|
3261
2733
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3262
|
-
return this.
|
|
2734
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'createVPCAssociationAuthorization', reqObj, true, (irReturnData, irReturnError) => {
|
|
3263
2735
|
// if we received an error or their is no response on the results
|
|
3264
2736
|
// return an error
|
|
3265
2737
|
if (irReturnError) {
|
|
@@ -3327,7 +2799,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3327
2799
|
const meth = 'adapter-listVPCAssociationAuthorizationsSTSRole';
|
|
3328
2800
|
const origin = `${this.id}-${meth}`;
|
|
3329
2801
|
log.trace(origin);
|
|
3330
|
-
const restVer = this.allProps.aws_ver;
|
|
3331
2802
|
|
|
3332
2803
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3333
2804
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3345,7 +2816,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3345
2816
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3346
2817
|
const queryParamsAvailable = { nexttoken, maxresults };
|
|
3347
2818
|
const queryParams = {};
|
|
3348
|
-
const pathVars = [
|
|
2819
|
+
const pathVars = [id];
|
|
3349
2820
|
const bodyVars = {};
|
|
3350
2821
|
|
|
3351
2822
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3356,35 +2827,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3356
2827
|
}
|
|
3357
2828
|
});
|
|
3358
2829
|
|
|
3359
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3360
|
-
let thisHeaderData = null;
|
|
3361
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3362
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3363
|
-
try {
|
|
3364
|
-
// parse the additional headers object that was passed in
|
|
3365
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3366
|
-
} catch (err) {
|
|
3367
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3368
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3369
|
-
return callback(null, errorObj);
|
|
3370
|
-
}
|
|
3371
|
-
} else if (thisHeaderData === null) {
|
|
3372
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
3373
|
-
}
|
|
3374
|
-
|
|
3375
2830
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3376
2831
|
// see adapter code documentation for more information on the request object's fields
|
|
3377
2832
|
const reqObj = {
|
|
3378
2833
|
payload: bodyVars,
|
|
3379
2834
|
uriPathVars: pathVars,
|
|
3380
2835
|
uriQuery: queryParams,
|
|
3381
|
-
|
|
2836
|
+
authData: {
|
|
2837
|
+
stsParams,
|
|
2838
|
+
roleName
|
|
2839
|
+
}
|
|
3382
2840
|
};
|
|
3383
2841
|
|
|
3384
2842
|
try {
|
|
3385
2843
|
// Make the call -
|
|
3386
2844
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3387
|
-
return this.
|
|
2845
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listVPCAssociationAuthorizations', reqObj, true, (irReturnData, irReturnError) => {
|
|
3388
2846
|
// if we received an error or their is no response on the results
|
|
3389
2847
|
// return an error
|
|
3390
2848
|
if (irReturnError) {
|
|
@@ -3450,7 +2908,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3450
2908
|
const meth = 'adapter-deactivateKeySigningKeySTSRole';
|
|
3451
2909
|
const origin = `${this.id}-${meth}`;
|
|
3452
2910
|
log.trace(origin);
|
|
3453
|
-
const restVer = this.allProps.aws_ver;
|
|
3454
2911
|
|
|
3455
2912
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3456
2913
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3473,7 +2930,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3473
2930
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3474
2931
|
const queryParamsAvailable = {};
|
|
3475
2932
|
const queryParams = {};
|
|
3476
|
-
const pathVars = [
|
|
2933
|
+
const pathVars = [hostedZoneId, name];
|
|
3477
2934
|
const bodyVars = '';
|
|
3478
2935
|
|
|
3479
2936
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3484,35 +2941,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3484
2941
|
}
|
|
3485
2942
|
});
|
|
3486
2943
|
|
|
3487
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3488
|
-
let thisHeaderData = null;
|
|
3489
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3490
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3491
|
-
try {
|
|
3492
|
-
// parse the additional headers object that was passed in
|
|
3493
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3494
|
-
} catch (err) {
|
|
3495
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3496
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3497
|
-
return callback(null, errorObj);
|
|
3498
|
-
}
|
|
3499
|
-
} else if (thisHeaderData === null) {
|
|
3500
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
2944
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3504
2945
|
// see adapter code documentation for more information on the request object's fields
|
|
3505
2946
|
const reqObj = {
|
|
3506
2947
|
payload: bodyVars,
|
|
3507
2948
|
uriPathVars: pathVars,
|
|
3508
2949
|
uriQuery: queryParams,
|
|
3509
|
-
|
|
2950
|
+
authData: {
|
|
2951
|
+
stsParams,
|
|
2952
|
+
roleName
|
|
2953
|
+
}
|
|
3510
2954
|
};
|
|
3511
2955
|
|
|
3512
2956
|
try {
|
|
3513
2957
|
// Make the call -
|
|
3514
2958
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3515
|
-
return this.
|
|
2959
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deactivateKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
|
|
3516
2960
|
// if we received an error or their is no response on the results
|
|
3517
2961
|
// return an error
|
|
3518
2962
|
if (irReturnError) {
|
|
@@ -3576,7 +3020,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3576
3020
|
const meth = 'adapter-deleteHealthCheckSTSRole';
|
|
3577
3021
|
const origin = `${this.id}-${meth}`;
|
|
3578
3022
|
log.trace(origin);
|
|
3579
|
-
const restVer = this.allProps.aws_ver;
|
|
3580
3023
|
|
|
3581
3024
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3582
3025
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3594,7 +3037,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3594
3037
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3595
3038
|
const queryParamsAvailable = {};
|
|
3596
3039
|
const queryParams = {};
|
|
3597
|
-
const pathVars = [
|
|
3040
|
+
const pathVars = [healthCheckId];
|
|
3598
3041
|
const bodyVars = {};
|
|
3599
3042
|
|
|
3600
3043
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3605,35 +3048,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3605
3048
|
}
|
|
3606
3049
|
});
|
|
3607
3050
|
|
|
3608
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3609
|
-
let thisHeaderData = null;
|
|
3610
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3611
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3612
|
-
try {
|
|
3613
|
-
// parse the additional headers object that was passed in
|
|
3614
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3615
|
-
} catch (err) {
|
|
3616
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3617
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3618
|
-
return callback(null, errorObj);
|
|
3619
|
-
}
|
|
3620
|
-
} else if (thisHeaderData === null) {
|
|
3621
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
3622
|
-
}
|
|
3623
|
-
|
|
3624
3051
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3625
3052
|
// see adapter code documentation for more information on the request object's fields
|
|
3626
3053
|
const reqObj = {
|
|
3627
3054
|
payload: bodyVars,
|
|
3628
3055
|
uriPathVars: pathVars,
|
|
3629
3056
|
uriQuery: queryParams,
|
|
3630
|
-
|
|
3057
|
+
authData: {
|
|
3058
|
+
stsParams,
|
|
3059
|
+
roleName
|
|
3060
|
+
}
|
|
3631
3061
|
};
|
|
3632
3062
|
|
|
3633
3063
|
try {
|
|
3634
3064
|
// Make the call -
|
|
3635
3065
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3636
|
-
return this.
|
|
3066
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
|
|
3637
3067
|
// if we received an error or their is no response on the results
|
|
3638
3068
|
// return an error
|
|
3639
3069
|
if (irReturnError) {
|
|
@@ -3697,7 +3127,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3697
3127
|
const meth = 'adapter-getHealthCheckSTSRole';
|
|
3698
3128
|
const origin = `${this.id}-${meth}`;
|
|
3699
3129
|
log.trace(origin);
|
|
3700
|
-
const restVer = this.allProps.aws_ver;
|
|
3701
3130
|
|
|
3702
3131
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3703
3132
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3715,7 +3144,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3715
3144
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3716
3145
|
const queryParamsAvailable = {};
|
|
3717
3146
|
const queryParams = {};
|
|
3718
|
-
const pathVars = [
|
|
3147
|
+
const pathVars = [healthCheckId];
|
|
3719
3148
|
const bodyVars = {};
|
|
3720
3149
|
|
|
3721
3150
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3726,35 +3155,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3726
3155
|
}
|
|
3727
3156
|
});
|
|
3728
3157
|
|
|
3729
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3730
|
-
let thisHeaderData = null;
|
|
3731
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3732
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3733
|
-
try {
|
|
3734
|
-
// parse the additional headers object that was passed in
|
|
3735
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3736
|
-
} catch (err) {
|
|
3737
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3738
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3739
|
-
return callback(null, errorObj);
|
|
3740
|
-
}
|
|
3741
|
-
} else if (thisHeaderData === null) {
|
|
3742
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
3743
|
-
}
|
|
3744
|
-
|
|
3745
3158
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3746
3159
|
// see adapter code documentation for more information on the request object's fields
|
|
3747
3160
|
const reqObj = {
|
|
3748
3161
|
payload: bodyVars,
|
|
3749
3162
|
uriPathVars: pathVars,
|
|
3750
3163
|
uriQuery: queryParams,
|
|
3751
|
-
|
|
3164
|
+
authData: {
|
|
3165
|
+
stsParams,
|
|
3166
|
+
roleName
|
|
3167
|
+
}
|
|
3752
3168
|
};
|
|
3753
3169
|
|
|
3754
3170
|
try {
|
|
3755
3171
|
// Make the call -
|
|
3756
3172
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3757
|
-
return this.
|
|
3173
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
|
|
3758
3174
|
// if we received an error or their is no response on the results
|
|
3759
3175
|
// return an error
|
|
3760
3176
|
if (irReturnError) {
|
|
@@ -3820,7 +3236,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3820
3236
|
const meth = 'adapter-updateHealthCheckSTSRole';
|
|
3821
3237
|
const origin = `${this.id}-${meth}`;
|
|
3822
3238
|
log.trace(origin);
|
|
3823
|
-
const restVer = this.allProps.aws_ver;
|
|
3824
3239
|
|
|
3825
3240
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3826
3241
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3843,7 +3258,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3843
3258
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3844
3259
|
const queryParamsAvailable = {};
|
|
3845
3260
|
const queryParams = {};
|
|
3846
|
-
const pathVars = [
|
|
3261
|
+
const pathVars = [healthCheckId];
|
|
3847
3262
|
const bodyVars = body;
|
|
3848
3263
|
|
|
3849
3264
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3854,35 +3269,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3854
3269
|
}
|
|
3855
3270
|
});
|
|
3856
3271
|
|
|
3857
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3858
|
-
let thisHeaderData = null;
|
|
3859
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3860
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3861
|
-
try {
|
|
3862
|
-
// parse the additional headers object that was passed in
|
|
3863
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3864
|
-
} catch (err) {
|
|
3865
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3866
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3867
|
-
return callback(null, errorObj);
|
|
3868
|
-
}
|
|
3869
|
-
} else if (thisHeaderData === null) {
|
|
3870
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
3871
|
-
}
|
|
3872
|
-
|
|
3873
3272
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3874
3273
|
// see adapter code documentation for more information on the request object's fields
|
|
3875
3274
|
const reqObj = {
|
|
3876
3275
|
payload: bodyVars,
|
|
3877
3276
|
uriPathVars: pathVars,
|
|
3878
3277
|
uriQuery: queryParams,
|
|
3879
|
-
|
|
3278
|
+
authData: {
|
|
3279
|
+
stsParams,
|
|
3280
|
+
roleName
|
|
3281
|
+
}
|
|
3880
3282
|
};
|
|
3881
3283
|
|
|
3882
3284
|
try {
|
|
3883
3285
|
// Make the call -
|
|
3884
3286
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
3885
|
-
return this.
|
|
3287
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'updateHealthCheck', reqObj, true, (irReturnData, irReturnError) => {
|
|
3886
3288
|
// if we received an error or their is no response on the results
|
|
3887
3289
|
// return an error
|
|
3888
3290
|
if (irReturnError) {
|
|
@@ -3946,7 +3348,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3946
3348
|
const meth = 'adapter-deleteHostedZoneSTSRole';
|
|
3947
3349
|
const origin = `${this.id}-${meth}`;
|
|
3948
3350
|
log.trace(origin);
|
|
3949
|
-
const restVer = this.allProps.aws_ver;
|
|
3950
3351
|
|
|
3951
3352
|
if (this.suspended && this.suspendMode === 'error') {
|
|
3952
3353
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -3964,7 +3365,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3964
3365
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
3965
3366
|
const queryParamsAvailable = {};
|
|
3966
3367
|
const queryParams = {};
|
|
3967
|
-
const pathVars = [
|
|
3368
|
+
const pathVars = [id];
|
|
3968
3369
|
const bodyVars = {};
|
|
3969
3370
|
|
|
3970
3371
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -3975,35 +3376,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
3975
3376
|
}
|
|
3976
3377
|
});
|
|
3977
3378
|
|
|
3978
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
3979
|
-
let thisHeaderData = null;
|
|
3980
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
3981
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
3982
|
-
try {
|
|
3983
|
-
// parse the additional headers object that was passed in
|
|
3984
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
3985
|
-
} catch (err) {
|
|
3986
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
3987
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
3988
|
-
return callback(null, errorObj);
|
|
3989
|
-
}
|
|
3990
|
-
} else if (thisHeaderData === null) {
|
|
3991
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
3992
|
-
}
|
|
3993
|
-
|
|
3994
3379
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
3995
3380
|
// see adapter code documentation for more information on the request object's fields
|
|
3996
3381
|
const reqObj = {
|
|
3997
3382
|
payload: bodyVars,
|
|
3998
3383
|
uriPathVars: pathVars,
|
|
3999
3384
|
uriQuery: queryParams,
|
|
4000
|
-
|
|
3385
|
+
authData: {
|
|
3386
|
+
stsParams,
|
|
3387
|
+
roleName
|
|
3388
|
+
}
|
|
4001
3389
|
};
|
|
4002
3390
|
|
|
4003
3391
|
try {
|
|
4004
3392
|
// Make the call -
|
|
4005
3393
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4006
|
-
return this.
|
|
3394
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
4007
3395
|
// if we received an error or their is no response on the results
|
|
4008
3396
|
// return an error
|
|
4009
3397
|
if (irReturnError) {
|
|
@@ -4067,7 +3455,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4067
3455
|
const meth = 'adapter-getHostedZoneSTSRole';
|
|
4068
3456
|
const origin = `${this.id}-${meth}`;
|
|
4069
3457
|
log.trace(origin);
|
|
4070
|
-
const restVer = this.allProps.aws_ver;
|
|
4071
3458
|
|
|
4072
3459
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4073
3460
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4085,7 +3472,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4085
3472
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4086
3473
|
const queryParamsAvailable = {};
|
|
4087
3474
|
const queryParams = {};
|
|
4088
|
-
const pathVars = [
|
|
3475
|
+
const pathVars = [id];
|
|
4089
3476
|
const bodyVars = {};
|
|
4090
3477
|
|
|
4091
3478
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4096,35 +3483,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4096
3483
|
}
|
|
4097
3484
|
});
|
|
4098
3485
|
|
|
4099
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4100
|
-
let thisHeaderData = null;
|
|
4101
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4102
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4103
|
-
try {
|
|
4104
|
-
// parse the additional headers object that was passed in
|
|
4105
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4106
|
-
} catch (err) {
|
|
4107
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4108
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4109
|
-
return callback(null, errorObj);
|
|
4110
|
-
}
|
|
4111
|
-
} else if (thisHeaderData === null) {
|
|
4112
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4113
|
-
}
|
|
4114
|
-
|
|
4115
3486
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4116
3487
|
// see adapter code documentation for more information on the request object's fields
|
|
4117
3488
|
const reqObj = {
|
|
4118
3489
|
payload: bodyVars,
|
|
4119
3490
|
uriPathVars: pathVars,
|
|
4120
3491
|
uriQuery: queryParams,
|
|
4121
|
-
|
|
3492
|
+
authData: {
|
|
3493
|
+
stsParams,
|
|
3494
|
+
roleName
|
|
3495
|
+
}
|
|
4122
3496
|
};
|
|
4123
3497
|
|
|
4124
3498
|
try {
|
|
4125
3499
|
// Make the call -
|
|
4126
3500
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4127
|
-
return this.
|
|
3501
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
4128
3502
|
// if we received an error or their is no response on the results
|
|
4129
3503
|
// return an error
|
|
4130
3504
|
if (irReturnError) {
|
|
@@ -4190,7 +3564,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4190
3564
|
const meth = 'adapter-updateHostedZoneCommentSTSRole';
|
|
4191
3565
|
const origin = `${this.id}-${meth}`;
|
|
4192
3566
|
log.trace(origin);
|
|
4193
|
-
const restVer = this.allProps.aws_ver;
|
|
4194
3567
|
|
|
4195
3568
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4196
3569
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4213,7 +3586,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4213
3586
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4214
3587
|
const queryParamsAvailable = {};
|
|
4215
3588
|
const queryParams = {};
|
|
4216
|
-
const pathVars = [
|
|
3589
|
+
const pathVars = [id];
|
|
4217
3590
|
const bodyVars = body;
|
|
4218
3591
|
|
|
4219
3592
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4224,35 +3597,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4224
3597
|
}
|
|
4225
3598
|
});
|
|
4226
3599
|
|
|
4227
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4228
|
-
let thisHeaderData = null;
|
|
4229
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4230
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4231
|
-
try {
|
|
4232
|
-
// parse the additional headers object that was passed in
|
|
4233
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4234
|
-
} catch (err) {
|
|
4235
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4236
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4237
|
-
return callback(null, errorObj);
|
|
4238
|
-
}
|
|
4239
|
-
} else if (thisHeaderData === null) {
|
|
4240
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
3600
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4244
3601
|
// see adapter code documentation for more information on the request object's fields
|
|
4245
3602
|
const reqObj = {
|
|
4246
3603
|
payload: bodyVars,
|
|
4247
3604
|
uriPathVars: pathVars,
|
|
4248
3605
|
uriQuery: queryParams,
|
|
4249
|
-
|
|
3606
|
+
authData: {
|
|
3607
|
+
stsParams,
|
|
3608
|
+
roleName
|
|
3609
|
+
}
|
|
4250
3610
|
};
|
|
4251
3611
|
|
|
4252
3612
|
try {
|
|
4253
3613
|
// Make the call -
|
|
4254
3614
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4255
|
-
return this.
|
|
3615
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'updateHostedZoneComment', reqObj, true, (irReturnData, irReturnError) => {
|
|
4256
3616
|
// if we received an error or their is no response on the results
|
|
4257
3617
|
// return an error
|
|
4258
3618
|
if (irReturnError) {
|
|
@@ -4318,7 +3678,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4318
3678
|
const meth = 'adapter-deleteKeySigningKeySTSRole';
|
|
4319
3679
|
const origin = `${this.id}-${meth}`;
|
|
4320
3680
|
log.trace(origin);
|
|
4321
|
-
const restVer = this.allProps.aws_ver;
|
|
4322
3681
|
|
|
4323
3682
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4324
3683
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4341,7 +3700,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4341
3700
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4342
3701
|
const queryParamsAvailable = {};
|
|
4343
3702
|
const queryParams = {};
|
|
4344
|
-
const pathVars = [
|
|
3703
|
+
const pathVars = [hostedZoneId, name];
|
|
4345
3704
|
const bodyVars = {};
|
|
4346
3705
|
|
|
4347
3706
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4352,35 +3711,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4352
3711
|
}
|
|
4353
3712
|
});
|
|
4354
3713
|
|
|
4355
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4356
|
-
let thisHeaderData = null;
|
|
4357
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4358
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4359
|
-
try {
|
|
4360
|
-
// parse the additional headers object that was passed in
|
|
4361
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4362
|
-
} catch (err) {
|
|
4363
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4364
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4365
|
-
return callback(null, errorObj);
|
|
4366
|
-
}
|
|
4367
|
-
} else if (thisHeaderData === null) {
|
|
4368
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4369
|
-
}
|
|
4370
|
-
|
|
4371
3714
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4372
3715
|
// see adapter code documentation for more information on the request object's fields
|
|
4373
3716
|
const reqObj = {
|
|
4374
3717
|
payload: bodyVars,
|
|
4375
3718
|
uriPathVars: pathVars,
|
|
4376
3719
|
uriQuery: queryParams,
|
|
4377
|
-
|
|
3720
|
+
authData: {
|
|
3721
|
+
stsParams,
|
|
3722
|
+
roleName
|
|
3723
|
+
}
|
|
4378
3724
|
};
|
|
4379
3725
|
|
|
4380
3726
|
try {
|
|
4381
3727
|
// Make the call -
|
|
4382
3728
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4383
|
-
return this.
|
|
3729
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteKeySigningKey', reqObj, true, (irReturnData, irReturnError) => {
|
|
4384
3730
|
// if we received an error or their is no response on the results
|
|
4385
3731
|
// return an error
|
|
4386
3732
|
if (irReturnError) {
|
|
@@ -4444,7 +3790,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4444
3790
|
const meth = 'adapter-deleteQueryLoggingConfigSTSRole';
|
|
4445
3791
|
const origin = `${this.id}-${meth}`;
|
|
4446
3792
|
log.trace(origin);
|
|
4447
|
-
const restVer = this.allProps.aws_ver;
|
|
4448
3793
|
|
|
4449
3794
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4450
3795
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4462,7 +3807,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4462
3807
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4463
3808
|
const queryParamsAvailable = {};
|
|
4464
3809
|
const queryParams = {};
|
|
4465
|
-
const pathVars = [
|
|
3810
|
+
const pathVars = [id];
|
|
4466
3811
|
const bodyVars = {};
|
|
4467
3812
|
|
|
4468
3813
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4473,35 +3818,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4473
3818
|
}
|
|
4474
3819
|
});
|
|
4475
3820
|
|
|
4476
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4477
|
-
let thisHeaderData = null;
|
|
4478
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4479
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4480
|
-
try {
|
|
4481
|
-
// parse the additional headers object that was passed in
|
|
4482
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4483
|
-
} catch (err) {
|
|
4484
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4485
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4486
|
-
return callback(null, errorObj);
|
|
4487
|
-
}
|
|
4488
|
-
} else if (thisHeaderData === null) {
|
|
4489
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4490
|
-
}
|
|
4491
|
-
|
|
4492
3821
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4493
3822
|
// see adapter code documentation for more information on the request object's fields
|
|
4494
3823
|
const reqObj = {
|
|
4495
3824
|
payload: bodyVars,
|
|
4496
3825
|
uriPathVars: pathVars,
|
|
4497
3826
|
uriQuery: queryParams,
|
|
4498
|
-
|
|
3827
|
+
authData: {
|
|
3828
|
+
stsParams,
|
|
3829
|
+
roleName
|
|
3830
|
+
}
|
|
4499
3831
|
};
|
|
4500
3832
|
|
|
4501
3833
|
try {
|
|
4502
3834
|
// Make the call -
|
|
4503
3835
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4504
|
-
return this.
|
|
3836
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
|
|
4505
3837
|
// if we received an error or their is no response on the results
|
|
4506
3838
|
// return an error
|
|
4507
3839
|
if (irReturnError) {
|
|
@@ -4565,7 +3897,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4565
3897
|
const meth = 'adapter-getQueryLoggingConfigSTSRole';
|
|
4566
3898
|
const origin = `${this.id}-${meth}`;
|
|
4567
3899
|
log.trace(origin);
|
|
4568
|
-
const restVer = this.allProps.aws_ver;
|
|
4569
3900
|
|
|
4570
3901
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4571
3902
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4583,7 +3914,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4583
3914
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4584
3915
|
const queryParamsAvailable = {};
|
|
4585
3916
|
const queryParams = {};
|
|
4586
|
-
const pathVars = [
|
|
3917
|
+
const pathVars = [id];
|
|
4587
3918
|
const bodyVars = {};
|
|
4588
3919
|
|
|
4589
3920
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4594,35 +3925,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4594
3925
|
}
|
|
4595
3926
|
});
|
|
4596
3927
|
|
|
4597
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4598
|
-
let thisHeaderData = null;
|
|
4599
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4600
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4601
|
-
try {
|
|
4602
|
-
// parse the additional headers object that was passed in
|
|
4603
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4604
|
-
} catch (err) {
|
|
4605
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4606
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4607
|
-
return callback(null, errorObj);
|
|
4608
|
-
}
|
|
4609
|
-
} else if (thisHeaderData === null) {
|
|
4610
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4611
|
-
}
|
|
4612
|
-
|
|
4613
3928
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4614
3929
|
// see adapter code documentation for more information on the request object's fields
|
|
4615
3930
|
const reqObj = {
|
|
4616
3931
|
payload: bodyVars,
|
|
4617
3932
|
uriPathVars: pathVars,
|
|
4618
3933
|
uriQuery: queryParams,
|
|
4619
|
-
|
|
3934
|
+
authData: {
|
|
3935
|
+
stsParams,
|
|
3936
|
+
roleName
|
|
3937
|
+
}
|
|
4620
3938
|
};
|
|
4621
3939
|
|
|
4622
3940
|
try {
|
|
4623
3941
|
// Make the call -
|
|
4624
3942
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4625
|
-
return this.
|
|
3943
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getQueryLoggingConfig', reqObj, true, (irReturnData, irReturnError) => {
|
|
4626
3944
|
// if we received an error or their is no response on the results
|
|
4627
3945
|
// return an error
|
|
4628
3946
|
if (irReturnError) {
|
|
@@ -4686,7 +4004,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4686
4004
|
const meth = 'adapter-deleteReusableDelegationSetSTSRole';
|
|
4687
4005
|
const origin = `${this.id}-${meth}`;
|
|
4688
4006
|
log.trace(origin);
|
|
4689
|
-
const restVer = this.allProps.aws_ver;
|
|
4690
4007
|
|
|
4691
4008
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4692
4009
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4704,7 +4021,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4704
4021
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4705
4022
|
const queryParamsAvailable = {};
|
|
4706
4023
|
const queryParams = {};
|
|
4707
|
-
const pathVars = [
|
|
4024
|
+
const pathVars = [id];
|
|
4708
4025
|
const bodyVars = {};
|
|
4709
4026
|
|
|
4710
4027
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4715,35 +4032,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4715
4032
|
}
|
|
4716
4033
|
});
|
|
4717
4034
|
|
|
4718
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4719
|
-
let thisHeaderData = null;
|
|
4720
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4721
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4722
|
-
try {
|
|
4723
|
-
// parse the additional headers object that was passed in
|
|
4724
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4725
|
-
} catch (err) {
|
|
4726
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4727
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4728
|
-
return callback(null, errorObj);
|
|
4729
|
-
}
|
|
4730
|
-
} else if (thisHeaderData === null) {
|
|
4731
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4732
|
-
}
|
|
4733
|
-
|
|
4734
4035
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4735
4036
|
// see adapter code documentation for more information on the request object's fields
|
|
4736
4037
|
const reqObj = {
|
|
4737
4038
|
payload: bodyVars,
|
|
4738
4039
|
uriPathVars: pathVars,
|
|
4739
4040
|
uriQuery: queryParams,
|
|
4740
|
-
|
|
4041
|
+
authData: {
|
|
4042
|
+
stsParams,
|
|
4043
|
+
roleName
|
|
4044
|
+
}
|
|
4741
4045
|
};
|
|
4742
4046
|
|
|
4743
4047
|
try {
|
|
4744
4048
|
// Make the call -
|
|
4745
4049
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4746
|
-
return this.
|
|
4050
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
|
|
4747
4051
|
// if we received an error or their is no response on the results
|
|
4748
4052
|
// return an error
|
|
4749
4053
|
if (irReturnError) {
|
|
@@ -4807,7 +4111,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4807
4111
|
const meth = 'adapter-getReusableDelegationSetSTSRole';
|
|
4808
4112
|
const origin = `${this.id}-${meth}`;
|
|
4809
4113
|
log.trace(origin);
|
|
4810
|
-
const restVer = this.allProps.aws_ver;
|
|
4811
4114
|
|
|
4812
4115
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4813
4116
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4825,7 +4128,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4825
4128
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4826
4129
|
const queryParamsAvailable = {};
|
|
4827
4130
|
const queryParams = {};
|
|
4828
|
-
const pathVars = [
|
|
4131
|
+
const pathVars = [id];
|
|
4829
4132
|
const bodyVars = {};
|
|
4830
4133
|
|
|
4831
4134
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4836,35 +4139,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4836
4139
|
}
|
|
4837
4140
|
});
|
|
4838
4141
|
|
|
4839
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4840
|
-
let thisHeaderData = null;
|
|
4841
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4842
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4843
|
-
try {
|
|
4844
|
-
// parse the additional headers object that was passed in
|
|
4845
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4846
|
-
} catch (err) {
|
|
4847
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4848
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4849
|
-
return callback(null, errorObj);
|
|
4850
|
-
}
|
|
4851
|
-
} else if (thisHeaderData === null) {
|
|
4852
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4853
|
-
}
|
|
4854
|
-
|
|
4855
4142
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4856
4143
|
// see adapter code documentation for more information on the request object's fields
|
|
4857
4144
|
const reqObj = {
|
|
4858
4145
|
payload: bodyVars,
|
|
4859
4146
|
uriPathVars: pathVars,
|
|
4860
4147
|
uriQuery: queryParams,
|
|
4861
|
-
|
|
4148
|
+
authData: {
|
|
4149
|
+
stsParams,
|
|
4150
|
+
roleName
|
|
4151
|
+
}
|
|
4862
4152
|
};
|
|
4863
4153
|
|
|
4864
4154
|
try {
|
|
4865
4155
|
// Make the call -
|
|
4866
4156
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4867
|
-
return this.
|
|
4157
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getReusableDelegationSet', reqObj, true, (irReturnData, irReturnError) => {
|
|
4868
4158
|
// if we received an error or their is no response on the results
|
|
4869
4159
|
// return an error
|
|
4870
4160
|
if (irReturnError) {
|
|
@@ -4930,7 +4220,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4930
4220
|
const meth = 'adapter-deleteTrafficPolicySTSRole';
|
|
4931
4221
|
const origin = `${this.id}-${meth}`;
|
|
4932
4222
|
log.trace(origin);
|
|
4933
|
-
const restVer = this.allProps.aws_ver;
|
|
4934
4223
|
|
|
4935
4224
|
if (this.suspended && this.suspendMode === 'error') {
|
|
4936
4225
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -4953,7 +4242,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4953
4242
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4954
4243
|
const queryParamsAvailable = {};
|
|
4955
4244
|
const queryParams = {};
|
|
4956
|
-
const pathVars = [
|
|
4245
|
+
const pathVars = [id, version];
|
|
4957
4246
|
const bodyVars = {};
|
|
4958
4247
|
|
|
4959
4248
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -4964,35 +4253,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
4964
4253
|
}
|
|
4965
4254
|
});
|
|
4966
4255
|
|
|
4967
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
4968
|
-
let thisHeaderData = null;
|
|
4969
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
4970
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
4971
|
-
try {
|
|
4972
|
-
// parse the additional headers object that was passed in
|
|
4973
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
4974
|
-
} catch (err) {
|
|
4975
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
4976
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
4977
|
-
return callback(null, errorObj);
|
|
4978
|
-
}
|
|
4979
|
-
} else if (thisHeaderData === null) {
|
|
4980
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
4981
|
-
}
|
|
4982
|
-
|
|
4983
4256
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
4984
4257
|
// see adapter code documentation for more information on the request object's fields
|
|
4985
4258
|
const reqObj = {
|
|
4986
4259
|
payload: bodyVars,
|
|
4987
4260
|
uriPathVars: pathVars,
|
|
4988
4261
|
uriQuery: queryParams,
|
|
4989
|
-
|
|
4262
|
+
authData: {
|
|
4263
|
+
stsParams,
|
|
4264
|
+
roleName
|
|
4265
|
+
}
|
|
4990
4266
|
};
|
|
4991
4267
|
|
|
4992
4268
|
try {
|
|
4993
4269
|
// Make the call -
|
|
4994
4270
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
4995
|
-
return this.
|
|
4271
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
|
|
4996
4272
|
// if we received an error or their is no response on the results
|
|
4997
4273
|
// return an error
|
|
4998
4274
|
if (irReturnError) {
|
|
@@ -5058,7 +4334,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5058
4334
|
const meth = 'adapter-getTrafficPolicySTSRole';
|
|
5059
4335
|
const origin = `${this.id}-${meth}`;
|
|
5060
4336
|
log.trace(origin);
|
|
5061
|
-
const restVer = this.allProps.aws_ver;
|
|
5062
4337
|
|
|
5063
4338
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5064
4339
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5081,7 +4356,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5081
4356
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5082
4357
|
const queryParamsAvailable = {};
|
|
5083
4358
|
const queryParams = {};
|
|
5084
|
-
const pathVars = [
|
|
4359
|
+
const pathVars = [id, version];
|
|
5085
4360
|
const bodyVars = {};
|
|
5086
4361
|
|
|
5087
4362
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5092,35 +4367,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5092
4367
|
}
|
|
5093
4368
|
});
|
|
5094
4369
|
|
|
5095
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5096
|
-
let thisHeaderData = null;
|
|
5097
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5098
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5099
|
-
try {
|
|
5100
|
-
// parse the additional headers object that was passed in
|
|
5101
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5102
|
-
} catch (err) {
|
|
5103
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5104
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5105
|
-
return callback(null, errorObj);
|
|
5106
|
-
}
|
|
5107
|
-
} else if (thisHeaderData === null) {
|
|
5108
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
5109
|
-
}
|
|
5110
|
-
|
|
5111
4370
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5112
4371
|
// see adapter code documentation for more information on the request object's fields
|
|
5113
4372
|
const reqObj = {
|
|
5114
4373
|
payload: bodyVars,
|
|
5115
4374
|
uriPathVars: pathVars,
|
|
5116
4375
|
uriQuery: queryParams,
|
|
5117
|
-
|
|
4376
|
+
authData: {
|
|
4377
|
+
stsParams,
|
|
4378
|
+
roleName
|
|
4379
|
+
}
|
|
5118
4380
|
};
|
|
5119
4381
|
|
|
5120
4382
|
try {
|
|
5121
4383
|
// Make the call -
|
|
5122
4384
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5123
|
-
return this.
|
|
4385
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicy', reqObj, true, (irReturnData, irReturnError) => {
|
|
5124
4386
|
// if we received an error or their is no response on the results
|
|
5125
4387
|
// return an error
|
|
5126
4388
|
if (irReturnError) {
|
|
@@ -5188,7 +4450,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5188
4450
|
const meth = 'adapter-updateTrafficPolicyCommentSTSRole';
|
|
5189
4451
|
const origin = `${this.id}-${meth}`;
|
|
5190
4452
|
log.trace(origin);
|
|
5191
|
-
const restVer = this.allProps.aws_ver;
|
|
5192
4453
|
|
|
5193
4454
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5194
4455
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5216,7 +4477,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5216
4477
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5217
4478
|
const queryParamsAvailable = {};
|
|
5218
4479
|
const queryParams = {};
|
|
5219
|
-
const pathVars = [
|
|
4480
|
+
const pathVars = [id, version];
|
|
5220
4481
|
const bodyVars = body;
|
|
5221
4482
|
|
|
5222
4483
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5227,35 +4488,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5227
4488
|
}
|
|
5228
4489
|
});
|
|
5229
4490
|
|
|
5230
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5231
|
-
let thisHeaderData = null;
|
|
5232
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5233
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5234
|
-
try {
|
|
5235
|
-
// parse the additional headers object that was passed in
|
|
5236
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5237
|
-
} catch (err) {
|
|
5238
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5239
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5240
|
-
return callback(null, errorObj);
|
|
5241
|
-
}
|
|
5242
|
-
} else if (thisHeaderData === null) {
|
|
5243
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
5244
|
-
}
|
|
5245
|
-
|
|
5246
4491
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5247
4492
|
// see adapter code documentation for more information on the request object's fields
|
|
5248
4493
|
const reqObj = {
|
|
5249
4494
|
payload: bodyVars,
|
|
5250
4495
|
uriPathVars: pathVars,
|
|
5251
4496
|
uriQuery: queryParams,
|
|
5252
|
-
|
|
4497
|
+
authData: {
|
|
4498
|
+
stsParams,
|
|
4499
|
+
roleName
|
|
4500
|
+
}
|
|
5253
4501
|
};
|
|
5254
4502
|
|
|
5255
4503
|
try {
|
|
5256
4504
|
// Make the call -
|
|
5257
4505
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5258
|
-
return this.
|
|
4506
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'updateTrafficPolicyComment', reqObj, true, (irReturnData, irReturnError) => {
|
|
5259
4507
|
// if we received an error or their is no response on the results
|
|
5260
4508
|
// return an error
|
|
5261
4509
|
if (irReturnError) {
|
|
@@ -5319,7 +4567,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5319
4567
|
const meth = 'adapter-deleteTrafficPolicyInstanceSTSRole';
|
|
5320
4568
|
const origin = `${this.id}-${meth}`;
|
|
5321
4569
|
log.trace(origin);
|
|
5322
|
-
const restVer = this.allProps.aws_ver;
|
|
5323
4570
|
|
|
5324
4571
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5325
4572
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5337,7 +4584,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5337
4584
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5338
4585
|
const queryParamsAvailable = {};
|
|
5339
4586
|
const queryParams = {};
|
|
5340
|
-
const pathVars = [
|
|
4587
|
+
const pathVars = [id];
|
|
5341
4588
|
const bodyVars = {};
|
|
5342
4589
|
|
|
5343
4590
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5348,35 +4595,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5348
4595
|
}
|
|
5349
4596
|
});
|
|
5350
4597
|
|
|
5351
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5352
|
-
let thisHeaderData = null;
|
|
5353
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5354
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5355
|
-
try {
|
|
5356
|
-
// parse the additional headers object that was passed in
|
|
5357
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5358
|
-
} catch (err) {
|
|
5359
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5360
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5361
|
-
return callback(null, errorObj);
|
|
5362
|
-
}
|
|
5363
|
-
} else if (thisHeaderData === null) {
|
|
5364
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
5365
|
-
}
|
|
5366
|
-
|
|
5367
4598
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5368
4599
|
// see adapter code documentation for more information on the request object's fields
|
|
5369
4600
|
const reqObj = {
|
|
5370
4601
|
payload: bodyVars,
|
|
5371
4602
|
uriPathVars: pathVars,
|
|
5372
4603
|
uriQuery: queryParams,
|
|
5373
|
-
|
|
4604
|
+
authData: {
|
|
4605
|
+
stsParams,
|
|
4606
|
+
roleName
|
|
4607
|
+
}
|
|
5374
4608
|
};
|
|
5375
4609
|
|
|
5376
4610
|
try {
|
|
5377
4611
|
// Make the call -
|
|
5378
4612
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5379
|
-
return this.
|
|
4613
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
|
|
5380
4614
|
// if we received an error or their is no response on the results
|
|
5381
4615
|
// return an error
|
|
5382
4616
|
if (irReturnError) {
|
|
@@ -5440,7 +4674,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5440
4674
|
const meth = 'adapter-getTrafficPolicyInstanceSTSRole';
|
|
5441
4675
|
const origin = `${this.id}-${meth}`;
|
|
5442
4676
|
log.trace(origin);
|
|
5443
|
-
const restVer = this.allProps.aws_ver;
|
|
5444
4677
|
|
|
5445
4678
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5446
4679
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5458,7 +4691,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5458
4691
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5459
4692
|
const queryParamsAvailable = {};
|
|
5460
4693
|
const queryParams = {};
|
|
5461
|
-
const pathVars = [
|
|
4694
|
+
const pathVars = [id];
|
|
5462
4695
|
const bodyVars = {};
|
|
5463
4696
|
|
|
5464
4697
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5469,35 +4702,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5469
4702
|
}
|
|
5470
4703
|
});
|
|
5471
4704
|
|
|
5472
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5473
|
-
let thisHeaderData = null;
|
|
5474
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5475
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5476
|
-
try {
|
|
5477
|
-
// parse the additional headers object that was passed in
|
|
5478
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5479
|
-
} catch (err) {
|
|
5480
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5481
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5482
|
-
return callback(null, errorObj);
|
|
5483
|
-
}
|
|
5484
|
-
} else if (thisHeaderData === null) {
|
|
5485
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
5486
|
-
}
|
|
5487
|
-
|
|
5488
4705
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5489
4706
|
// see adapter code documentation for more information on the request object's fields
|
|
5490
4707
|
const reqObj = {
|
|
5491
4708
|
payload: bodyVars,
|
|
5492
4709
|
uriPathVars: pathVars,
|
|
5493
4710
|
uriQuery: queryParams,
|
|
5494
|
-
|
|
4711
|
+
authData: {
|
|
4712
|
+
stsParams,
|
|
4713
|
+
roleName
|
|
4714
|
+
}
|
|
5495
4715
|
};
|
|
5496
4716
|
|
|
5497
4717
|
try {
|
|
5498
4718
|
// Make the call -
|
|
5499
4719
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5500
|
-
return this.
|
|
4720
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
|
|
5501
4721
|
// if we received an error or their is no response on the results
|
|
5502
4722
|
// return an error
|
|
5503
4723
|
if (irReturnError) {
|
|
@@ -5563,7 +4783,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5563
4783
|
const meth = 'adapter-updateTrafficPolicyInstanceSTSRole';
|
|
5564
4784
|
const origin = `${this.id}-${meth}`;
|
|
5565
4785
|
log.trace(origin);
|
|
5566
|
-
const restVer = this.allProps.aws_ver;
|
|
5567
4786
|
|
|
5568
4787
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5569
4788
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5586,7 +4805,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5586
4805
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5587
4806
|
const queryParamsAvailable = {};
|
|
5588
4807
|
const queryParams = {};
|
|
5589
|
-
const pathVars = [
|
|
4808
|
+
const pathVars = [id];
|
|
5590
4809
|
const bodyVars = body;
|
|
5591
4810
|
|
|
5592
4811
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5597,35 +4816,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5597
4816
|
}
|
|
5598
4817
|
});
|
|
5599
4818
|
|
|
5600
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5601
|
-
let thisHeaderData = null;
|
|
5602
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5603
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5604
|
-
try {
|
|
5605
|
-
// parse the additional headers object that was passed in
|
|
5606
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5607
|
-
} catch (err) {
|
|
5608
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5609
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5610
|
-
return callback(null, errorObj);
|
|
5611
|
-
}
|
|
5612
|
-
} else if (thisHeaderData === null) {
|
|
5613
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
5614
|
-
}
|
|
5615
|
-
|
|
5616
4819
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5617
4820
|
// see adapter code documentation for more information on the request object's fields
|
|
5618
4821
|
const reqObj = {
|
|
5619
4822
|
payload: bodyVars,
|
|
5620
4823
|
uriPathVars: pathVars,
|
|
5621
4824
|
uriQuery: queryParams,
|
|
5622
|
-
|
|
4825
|
+
authData: {
|
|
4826
|
+
stsParams,
|
|
4827
|
+
roleName
|
|
4828
|
+
}
|
|
5623
4829
|
};
|
|
5624
4830
|
|
|
5625
4831
|
try {
|
|
5626
4832
|
// Make the call -
|
|
5627
4833
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5628
|
-
return this.
|
|
4834
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'updateTrafficPolicyInstance', reqObj, true, (irReturnData, irReturnError) => {
|
|
5629
4835
|
// if we received an error or their is no response on the results
|
|
5630
4836
|
// return an error
|
|
5631
4837
|
if (irReturnError) {
|
|
@@ -5691,7 +4897,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5691
4897
|
const meth = 'adapter-deleteVPCAssociationAuthorizationSTSRole';
|
|
5692
4898
|
const origin = `${this.id}-${meth}`;
|
|
5693
4899
|
log.trace(origin);
|
|
5694
|
-
const restVer = this.allProps.aws_ver;
|
|
5695
4900
|
|
|
5696
4901
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5697
4902
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5714,7 +4919,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5714
4919
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5715
4920
|
const queryParamsAvailable = {};
|
|
5716
4921
|
const queryParams = {};
|
|
5717
|
-
const pathVars = [
|
|
4922
|
+
const pathVars = [id];
|
|
5718
4923
|
const bodyVars = body;
|
|
5719
4924
|
|
|
5720
4925
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5725,35 +4930,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5725
4930
|
}
|
|
5726
4931
|
});
|
|
5727
4932
|
|
|
5728
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5729
|
-
let thisHeaderData = null;
|
|
5730
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5731
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5732
|
-
try {
|
|
5733
|
-
// parse the additional headers object that was passed in
|
|
5734
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5735
|
-
} catch (err) {
|
|
5736
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5737
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5738
|
-
return callback(null, errorObj);
|
|
5739
|
-
}
|
|
5740
|
-
} else if (thisHeaderData === null) {
|
|
5741
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
5742
|
-
}
|
|
5743
|
-
|
|
5744
4933
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5745
4934
|
// see adapter code documentation for more information on the request object's fields
|
|
5746
4935
|
const reqObj = {
|
|
5747
4936
|
payload: bodyVars,
|
|
5748
4937
|
uriPathVars: pathVars,
|
|
5749
4938
|
uriQuery: queryParams,
|
|
5750
|
-
|
|
4939
|
+
authData: {
|
|
4940
|
+
stsParams,
|
|
4941
|
+
roleName
|
|
4942
|
+
}
|
|
5751
4943
|
};
|
|
5752
4944
|
|
|
5753
4945
|
try {
|
|
5754
4946
|
// Make the call -
|
|
5755
4947
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5756
|
-
return this.
|
|
4948
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'deleteVPCAssociationAuthorization', reqObj, true, (irReturnData, irReturnError) => {
|
|
5757
4949
|
// if we received an error or their is no response on the results
|
|
5758
4950
|
// return an error
|
|
5759
4951
|
if (irReturnError) {
|
|
@@ -5817,7 +5009,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5817
5009
|
const meth = 'adapter-disableHostedZoneDNSSECSTSRole';
|
|
5818
5010
|
const origin = `${this.id}-${meth}`;
|
|
5819
5011
|
log.trace(origin);
|
|
5820
|
-
const restVer = this.allProps.aws_ver;
|
|
5821
5012
|
|
|
5822
5013
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5823
5014
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5835,7 +5026,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5835
5026
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5836
5027
|
const queryParamsAvailable = {};
|
|
5837
5028
|
const queryParams = {};
|
|
5838
|
-
const pathVars = [
|
|
5029
|
+
const pathVars = [id];
|
|
5839
5030
|
const bodyVars = '';
|
|
5840
5031
|
|
|
5841
5032
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5846,35 +5037,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5846
5037
|
}
|
|
5847
5038
|
});
|
|
5848
5039
|
|
|
5849
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5850
|
-
let thisHeaderData = null;
|
|
5851
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5852
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5853
|
-
try {
|
|
5854
|
-
// parse the additional headers object that was passed in
|
|
5855
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5856
|
-
} catch (err) {
|
|
5857
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5858
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5859
|
-
return callback(null, errorObj);
|
|
5860
|
-
}
|
|
5861
|
-
} else if (thisHeaderData === null) {
|
|
5862
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
5863
|
-
}
|
|
5864
|
-
|
|
5865
5040
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5866
5041
|
// see adapter code documentation for more information on the request object's fields
|
|
5867
5042
|
const reqObj = {
|
|
5868
5043
|
payload: bodyVars,
|
|
5869
5044
|
uriPathVars: pathVars,
|
|
5870
5045
|
uriQuery: queryParams,
|
|
5871
|
-
|
|
5046
|
+
authData: {
|
|
5047
|
+
stsParams,
|
|
5048
|
+
roleName
|
|
5049
|
+
}
|
|
5872
5050
|
};
|
|
5873
5051
|
|
|
5874
5052
|
try {
|
|
5875
5053
|
// Make the call -
|
|
5876
5054
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
5877
|
-
return this.
|
|
5055
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'disableHostedZoneDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
|
|
5878
5056
|
// if we received an error or their is no response on the results
|
|
5879
5057
|
// return an error
|
|
5880
5058
|
if (irReturnError) {
|
|
@@ -5940,7 +5118,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5940
5118
|
const meth = 'adapter-disassociateVPCFromHostedZoneSTSRole';
|
|
5941
5119
|
const origin = `${this.id}-${meth}`;
|
|
5942
5120
|
log.trace(origin);
|
|
5943
|
-
const restVer = this.allProps.aws_ver;
|
|
5944
5121
|
|
|
5945
5122
|
if (this.suspended && this.suspendMode === 'error') {
|
|
5946
5123
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -5963,7 +5140,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5963
5140
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
5964
5141
|
const queryParamsAvailable = {};
|
|
5965
5142
|
const queryParams = {};
|
|
5966
|
-
const pathVars = [
|
|
5143
|
+
const pathVars = [id];
|
|
5967
5144
|
const bodyVars = body;
|
|
5968
5145
|
|
|
5969
5146
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -5974,35 +5151,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
5974
5151
|
}
|
|
5975
5152
|
});
|
|
5976
5153
|
|
|
5977
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
5978
|
-
let thisHeaderData = null;
|
|
5979
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
5980
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
5981
|
-
try {
|
|
5982
|
-
// parse the additional headers object that was passed in
|
|
5983
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
5984
|
-
} catch (err) {
|
|
5985
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
5986
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
5987
|
-
return callback(null, errorObj);
|
|
5988
|
-
}
|
|
5989
|
-
} else if (thisHeaderData === null) {
|
|
5990
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
5991
|
-
}
|
|
5992
|
-
|
|
5993
5154
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
5994
5155
|
// see adapter code documentation for more information on the request object's fields
|
|
5995
5156
|
const reqObj = {
|
|
5996
5157
|
payload: bodyVars,
|
|
5997
5158
|
uriPathVars: pathVars,
|
|
5998
5159
|
uriQuery: queryParams,
|
|
5999
|
-
|
|
5160
|
+
authData: {
|
|
5161
|
+
stsParams,
|
|
5162
|
+
roleName
|
|
5163
|
+
}
|
|
6000
5164
|
};
|
|
6001
5165
|
|
|
6002
5166
|
try {
|
|
6003
5167
|
// Make the call -
|
|
6004
5168
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6005
|
-
return this.
|
|
5169
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'disassociateVPCFromHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
6006
5170
|
// if we received an error or their is no response on the results
|
|
6007
5171
|
// return an error
|
|
6008
5172
|
if (irReturnError) {
|
|
@@ -6066,7 +5230,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6066
5230
|
const meth = 'adapter-enableHostedZoneDNSSECSTSRole';
|
|
6067
5231
|
const origin = `${this.id}-${meth}`;
|
|
6068
5232
|
log.trace(origin);
|
|
6069
|
-
const restVer = this.allProps.aws_ver;
|
|
6070
5233
|
|
|
6071
5234
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6072
5235
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6084,7 +5247,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6084
5247
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6085
5248
|
const queryParamsAvailable = {};
|
|
6086
5249
|
const queryParams = {};
|
|
6087
|
-
const pathVars = [
|
|
5250
|
+
const pathVars = [id];
|
|
6088
5251
|
const bodyVars = '';
|
|
6089
5252
|
|
|
6090
5253
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6095,35 +5258,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6095
5258
|
}
|
|
6096
5259
|
});
|
|
6097
5260
|
|
|
6098
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6099
|
-
let thisHeaderData = null;
|
|
6100
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6101
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6102
|
-
try {
|
|
6103
|
-
// parse the additional headers object that was passed in
|
|
6104
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6105
|
-
} catch (err) {
|
|
6106
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6107
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6108
|
-
return callback(null, errorObj);
|
|
6109
|
-
}
|
|
6110
|
-
} else if (thisHeaderData === null) {
|
|
6111
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6112
|
-
}
|
|
6113
|
-
|
|
6114
5261
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6115
5262
|
// see adapter code documentation for more information on the request object's fields
|
|
6116
5263
|
const reqObj = {
|
|
6117
5264
|
payload: bodyVars,
|
|
6118
5265
|
uriPathVars: pathVars,
|
|
6119
5266
|
uriQuery: queryParams,
|
|
6120
|
-
|
|
5267
|
+
authData: {
|
|
5268
|
+
stsParams,
|
|
5269
|
+
roleName
|
|
5270
|
+
}
|
|
6121
5271
|
};
|
|
6122
5272
|
|
|
6123
5273
|
try {
|
|
6124
5274
|
// Make the call -
|
|
6125
5275
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6126
|
-
return this.
|
|
5276
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'enableHostedZoneDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
|
|
6127
5277
|
// if we received an error or their is no response on the results
|
|
6128
5278
|
// return an error
|
|
6129
5279
|
if (irReturnError) {
|
|
@@ -6187,7 +5337,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6187
5337
|
const meth = 'adapter-getAccountLimitSTSRole';
|
|
6188
5338
|
const origin = `${this.id}-${meth}`;
|
|
6189
5339
|
log.trace(origin);
|
|
6190
|
-
const restVer = this.allProps.aws_ver;
|
|
6191
5340
|
|
|
6192
5341
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6193
5342
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6205,7 +5354,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6205
5354
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6206
5355
|
const queryParamsAvailable = {};
|
|
6207
5356
|
const queryParams = {};
|
|
6208
|
-
const pathVars = [
|
|
5357
|
+
const pathVars = [type];
|
|
6209
5358
|
const bodyVars = {};
|
|
6210
5359
|
|
|
6211
5360
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6216,35 +5365,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6216
5365
|
}
|
|
6217
5366
|
});
|
|
6218
5367
|
|
|
6219
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6220
|
-
let thisHeaderData = null;
|
|
6221
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6222
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6223
|
-
try {
|
|
6224
|
-
// parse the additional headers object that was passed in
|
|
6225
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6226
|
-
} catch (err) {
|
|
6227
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6228
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6229
|
-
return callback(null, errorObj);
|
|
6230
|
-
}
|
|
6231
|
-
} else if (thisHeaderData === null) {
|
|
6232
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6233
|
-
}
|
|
6234
|
-
|
|
6235
5368
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6236
5369
|
// see adapter code documentation for more information on the request object's fields
|
|
6237
5370
|
const reqObj = {
|
|
6238
5371
|
payload: bodyVars,
|
|
6239
5372
|
uriPathVars: pathVars,
|
|
6240
5373
|
uriQuery: queryParams,
|
|
6241
|
-
|
|
5374
|
+
authData: {
|
|
5375
|
+
stsParams,
|
|
5376
|
+
roleName
|
|
5377
|
+
}
|
|
6242
5378
|
};
|
|
6243
5379
|
|
|
6244
5380
|
try {
|
|
6245
5381
|
// Make the call -
|
|
6246
5382
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6247
|
-
return this.
|
|
5383
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'changeResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
|
|
6248
5384
|
// if we received an error or their is no response on the results
|
|
6249
5385
|
// return an error
|
|
6250
5386
|
if (irReturnError) {
|
|
@@ -6308,7 +5444,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6308
5444
|
const meth = 'adapter-getChangeSTSRole';
|
|
6309
5445
|
const origin = `${this.id}-${meth}`;
|
|
6310
5446
|
log.trace(origin);
|
|
6311
|
-
const restVer = this.allProps.aws_ver;
|
|
6312
5447
|
|
|
6313
5448
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6314
5449
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6326,7 +5461,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6326
5461
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6327
5462
|
const queryParamsAvailable = {};
|
|
6328
5463
|
const queryParams = {};
|
|
6329
|
-
const pathVars = [
|
|
5464
|
+
const pathVars = [id];
|
|
6330
5465
|
const bodyVars = {};
|
|
6331
5466
|
|
|
6332
5467
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6337,35 +5472,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6337
5472
|
}
|
|
6338
5473
|
});
|
|
6339
5474
|
|
|
6340
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6341
|
-
let thisHeaderData = null;
|
|
6342
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6343
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6344
|
-
try {
|
|
6345
|
-
// parse the additional headers object that was passed in
|
|
6346
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6347
|
-
} catch (err) {
|
|
6348
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6349
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6350
|
-
return callback(null, errorObj);
|
|
6351
|
-
}
|
|
6352
|
-
} else if (thisHeaderData === null) {
|
|
6353
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6354
|
-
}
|
|
6355
|
-
|
|
6356
5475
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6357
5476
|
// see adapter code documentation for more information on the request object's fields
|
|
6358
5477
|
const reqObj = {
|
|
6359
5478
|
payload: bodyVars,
|
|
6360
5479
|
uriPathVars: pathVars,
|
|
6361
5480
|
uriQuery: queryParams,
|
|
6362
|
-
|
|
5481
|
+
authData: {
|
|
5482
|
+
stsParams,
|
|
5483
|
+
roleName
|
|
5484
|
+
}
|
|
6363
5485
|
};
|
|
6364
5486
|
|
|
6365
5487
|
try {
|
|
6366
5488
|
// Make the call -
|
|
6367
5489
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6368
|
-
return this.
|
|
5490
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getChange', reqObj, true, (irReturnData, irReturnError) => {
|
|
6369
5491
|
// if we received an error or their is no response on the results
|
|
6370
5492
|
// return an error
|
|
6371
5493
|
if (irReturnError) {
|
|
@@ -6427,7 +5549,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6427
5549
|
const meth = 'adapter-getCheckerIpRangesSTSRole';
|
|
6428
5550
|
const origin = `${this.id}-${meth}`;
|
|
6429
5551
|
log.trace(origin);
|
|
6430
|
-
const restVer = this.allProps.aws_ver;
|
|
6431
5552
|
|
|
6432
5553
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6433
5554
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6440,7 +5561,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6440
5561
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6441
5562
|
const queryParamsAvailable = {};
|
|
6442
5563
|
const queryParams = {};
|
|
6443
|
-
const pathVars = [
|
|
5564
|
+
const pathVars = [];
|
|
6444
5565
|
const bodyVars = {};
|
|
6445
5566
|
|
|
6446
5567
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6451,35 +5572,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6451
5572
|
}
|
|
6452
5573
|
});
|
|
6453
5574
|
|
|
6454
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6455
|
-
let thisHeaderData = null;
|
|
6456
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6457
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6458
|
-
try {
|
|
6459
|
-
// parse the additional headers object that was passed in
|
|
6460
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6461
|
-
} catch (err) {
|
|
6462
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6463
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6464
|
-
return callback(null, errorObj);
|
|
6465
|
-
}
|
|
6466
|
-
} else if (thisHeaderData === null) {
|
|
6467
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6468
|
-
}
|
|
6469
|
-
|
|
6470
5575
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6471
5576
|
// see adapter code documentation for more information on the request object's fields
|
|
6472
5577
|
const reqObj = {
|
|
6473
5578
|
payload: bodyVars,
|
|
6474
5579
|
uriPathVars: pathVars,
|
|
6475
5580
|
uriQuery: queryParams,
|
|
6476
|
-
|
|
5581
|
+
authData: {
|
|
5582
|
+
stsParams,
|
|
5583
|
+
roleName
|
|
5584
|
+
}
|
|
6477
5585
|
};
|
|
6478
5586
|
|
|
6479
5587
|
try {
|
|
6480
5588
|
// Make the call -
|
|
6481
5589
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6482
|
-
return this.
|
|
5590
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getCheckerIpRanges', reqObj, true, (irReturnData, irReturnError) => {
|
|
6483
5591
|
// if we received an error or their is no response on the results
|
|
6484
5592
|
// return an error
|
|
6485
5593
|
if (irReturnError) {
|
|
@@ -6543,7 +5651,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6543
5651
|
const meth = 'adapter-getDNSSECSTSRole';
|
|
6544
5652
|
const origin = `${this.id}-${meth}`;
|
|
6545
5653
|
log.trace(origin);
|
|
6546
|
-
const restVer = this.allProps.aws_ver;
|
|
6547
5654
|
|
|
6548
5655
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6549
5656
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6561,7 +5668,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6561
5668
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6562
5669
|
const queryParamsAvailable = {};
|
|
6563
5670
|
const queryParams = {};
|
|
6564
|
-
const pathVars = [
|
|
5671
|
+
const pathVars = [id];
|
|
6565
5672
|
const bodyVars = {};
|
|
6566
5673
|
|
|
6567
5674
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6572,35 +5679,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6572
5679
|
}
|
|
6573
5680
|
});
|
|
6574
5681
|
|
|
6575
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6576
|
-
let thisHeaderData = null;
|
|
6577
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6578
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6579
|
-
try {
|
|
6580
|
-
// parse the additional headers object that was passed in
|
|
6581
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6582
|
-
} catch (err) {
|
|
6583
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6584
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6585
|
-
return callback(null, errorObj);
|
|
6586
|
-
}
|
|
6587
|
-
} else if (thisHeaderData === null) {
|
|
6588
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6589
|
-
}
|
|
6590
|
-
|
|
6591
5682
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6592
5683
|
// see adapter code documentation for more information on the request object's fields
|
|
6593
5684
|
const reqObj = {
|
|
6594
5685
|
payload: bodyVars,
|
|
6595
5686
|
uriPathVars: pathVars,
|
|
6596
5687
|
uriQuery: queryParams,
|
|
6597
|
-
|
|
5688
|
+
authData: {
|
|
5689
|
+
stsParams,
|
|
5690
|
+
roleName
|
|
5691
|
+
}
|
|
6598
5692
|
};
|
|
6599
5693
|
|
|
6600
5694
|
try {
|
|
6601
5695
|
// Make the call -
|
|
6602
5696
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6603
|
-
return this.
|
|
5697
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getDNSSEC', reqObj, true, (irReturnData, irReturnError) => {
|
|
6604
5698
|
// if we received an error or their is no response on the results
|
|
6605
5699
|
// return an error
|
|
6606
5700
|
if (irReturnError) {
|
|
@@ -6668,7 +5762,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6668
5762
|
const meth = 'adapter-getGeoLocationSTSRole';
|
|
6669
5763
|
const origin = `${this.id}-${meth}`;
|
|
6670
5764
|
log.trace(origin);
|
|
6671
|
-
const restVer = this.allProps.aws_ver;
|
|
6672
5765
|
|
|
6673
5766
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6674
5767
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6681,7 +5774,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6681
5774
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6682
5775
|
const queryParamsAvailable = { continentcode, countrycode, subdivisioncode };
|
|
6683
5776
|
const queryParams = {};
|
|
6684
|
-
const pathVars = [
|
|
5777
|
+
const pathVars = [];
|
|
6685
5778
|
const bodyVars = {};
|
|
6686
5779
|
|
|
6687
5780
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6692,35 +5785,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6692
5785
|
}
|
|
6693
5786
|
});
|
|
6694
5787
|
|
|
6695
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6696
|
-
let thisHeaderData = null;
|
|
6697
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6698
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6699
|
-
try {
|
|
6700
|
-
// parse the additional headers object that was passed in
|
|
6701
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6702
|
-
} catch (err) {
|
|
6703
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6704
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6705
|
-
return callback(null, errorObj);
|
|
6706
|
-
}
|
|
6707
|
-
} else if (thisHeaderData === null) {
|
|
6708
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6709
|
-
}
|
|
6710
|
-
|
|
6711
5788
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6712
5789
|
// see adapter code documentation for more information on the request object's fields
|
|
6713
5790
|
const reqObj = {
|
|
6714
5791
|
payload: bodyVars,
|
|
6715
5792
|
uriPathVars: pathVars,
|
|
6716
5793
|
uriQuery: queryParams,
|
|
6717
|
-
|
|
5794
|
+
authData: {
|
|
5795
|
+
stsParams,
|
|
5796
|
+
roleName
|
|
5797
|
+
}
|
|
6718
5798
|
};
|
|
6719
5799
|
|
|
6720
5800
|
try {
|
|
6721
5801
|
// Make the call -
|
|
6722
5802
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6723
|
-
return this.
|
|
5803
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getGeoLocation', reqObj, true, (irReturnData, irReturnError) => {
|
|
6724
5804
|
// if we received an error or their is no response on the results
|
|
6725
5805
|
// return an error
|
|
6726
5806
|
if (irReturnError) {
|
|
@@ -6782,7 +5862,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6782
5862
|
const meth = 'adapter-getHealthCheckCountSTSRole';
|
|
6783
5863
|
const origin = `${this.id}-${meth}`;
|
|
6784
5864
|
log.trace(origin);
|
|
6785
|
-
const restVer = this.allProps.aws_ver;
|
|
6786
5865
|
|
|
6787
5866
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6788
5867
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6795,7 +5874,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6795
5874
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6796
5875
|
const queryParamsAvailable = {};
|
|
6797
5876
|
const queryParams = {};
|
|
6798
|
-
const pathVars = [
|
|
5877
|
+
const pathVars = [];
|
|
6799
5878
|
const bodyVars = {};
|
|
6800
5879
|
|
|
6801
5880
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6806,35 +5885,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6806
5885
|
}
|
|
6807
5886
|
});
|
|
6808
5887
|
|
|
6809
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6810
|
-
let thisHeaderData = null;
|
|
6811
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6812
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6813
|
-
try {
|
|
6814
|
-
// parse the additional headers object that was passed in
|
|
6815
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6816
|
-
} catch (err) {
|
|
6817
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6818
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6819
|
-
return callback(null, errorObj);
|
|
6820
|
-
}
|
|
6821
|
-
} else if (thisHeaderData === null) {
|
|
6822
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6823
|
-
}
|
|
6824
|
-
|
|
6825
5888
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6826
5889
|
// see adapter code documentation for more information on the request object's fields
|
|
6827
5890
|
const reqObj = {
|
|
6828
5891
|
payload: bodyVars,
|
|
6829
5892
|
uriPathVars: pathVars,
|
|
6830
5893
|
uriQuery: queryParams,
|
|
6831
|
-
|
|
5894
|
+
authData: {
|
|
5895
|
+
stsParams,
|
|
5896
|
+
roleName
|
|
5897
|
+
}
|
|
6832
5898
|
};
|
|
6833
5899
|
|
|
6834
5900
|
try {
|
|
6835
5901
|
// Make the call -
|
|
6836
5902
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6837
|
-
return this.
|
|
5903
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckCount', reqObj, true, (irReturnData, irReturnError) => {
|
|
6838
5904
|
// if we received an error or their is no response on the results
|
|
6839
5905
|
// return an error
|
|
6840
5906
|
if (irReturnError) {
|
|
@@ -6898,7 +5964,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6898
5964
|
const meth = 'adapter-getHealthCheckLastFailureReasonSTSRole';
|
|
6899
5965
|
const origin = `${this.id}-${meth}`;
|
|
6900
5966
|
log.trace(origin);
|
|
6901
|
-
const restVer = this.allProps.aws_ver;
|
|
6902
5967
|
|
|
6903
5968
|
if (this.suspended && this.suspendMode === 'error') {
|
|
6904
5969
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -6916,7 +5981,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6916
5981
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6917
5982
|
const queryParamsAvailable = {};
|
|
6918
5983
|
const queryParams = {};
|
|
6919
|
-
const pathVars = [
|
|
5984
|
+
const pathVars = [healthCheckId];
|
|
6920
5985
|
const bodyVars = {};
|
|
6921
5986
|
|
|
6922
5987
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -6927,35 +5992,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
6927
5992
|
}
|
|
6928
5993
|
});
|
|
6929
5994
|
|
|
6930
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
6931
|
-
let thisHeaderData = null;
|
|
6932
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
6933
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
6934
|
-
try {
|
|
6935
|
-
// parse the additional headers object that was passed in
|
|
6936
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
6937
|
-
} catch (err) {
|
|
6938
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
6939
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6940
|
-
return callback(null, errorObj);
|
|
6941
|
-
}
|
|
6942
|
-
} else if (thisHeaderData === null) {
|
|
6943
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
6944
|
-
}
|
|
6945
|
-
|
|
6946
5995
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
6947
5996
|
// see adapter code documentation for more information on the request object's fields
|
|
6948
5997
|
const reqObj = {
|
|
6949
5998
|
payload: bodyVars,
|
|
6950
5999
|
uriPathVars: pathVars,
|
|
6951
6000
|
uriQuery: queryParams,
|
|
6952
|
-
|
|
6001
|
+
authData: {
|
|
6002
|
+
stsParams,
|
|
6003
|
+
roleName
|
|
6004
|
+
}
|
|
6953
6005
|
};
|
|
6954
6006
|
|
|
6955
6007
|
try {
|
|
6956
6008
|
// Make the call -
|
|
6957
6009
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
6958
|
-
return this.
|
|
6010
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckLastFailureReason', reqObj, true, (irReturnData, irReturnError) => {
|
|
6959
6011
|
// if we received an error or their is no response on the results
|
|
6960
6012
|
// return an error
|
|
6961
6013
|
if (irReturnError) {
|
|
@@ -7019,7 +6071,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7019
6071
|
const meth = 'adapter-getHealthCheckStatusSTSRole';
|
|
7020
6072
|
const origin = `${this.id}-${meth}`;
|
|
7021
6073
|
log.trace(origin);
|
|
7022
|
-
const restVer = this.allProps.aws_ver;
|
|
7023
6074
|
|
|
7024
6075
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7025
6076
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7037,7 +6088,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7037
6088
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7038
6089
|
const queryParamsAvailable = {};
|
|
7039
6090
|
const queryParams = {};
|
|
7040
|
-
const pathVars = [
|
|
6091
|
+
const pathVars = [healthCheckId];
|
|
7041
6092
|
const bodyVars = {};
|
|
7042
6093
|
|
|
7043
6094
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7048,35 +6099,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7048
6099
|
}
|
|
7049
6100
|
});
|
|
7050
6101
|
|
|
7051
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7052
|
-
let thisHeaderData = null;
|
|
7053
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7054
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7055
|
-
try {
|
|
7056
|
-
// parse the additional headers object that was passed in
|
|
7057
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7058
|
-
} catch (err) {
|
|
7059
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7060
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7061
|
-
return callback(null, errorObj);
|
|
7062
|
-
}
|
|
7063
|
-
} else if (thisHeaderData === null) {
|
|
7064
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7065
|
-
}
|
|
7066
|
-
|
|
7067
6102
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7068
6103
|
// see adapter code documentation for more information on the request object's fields
|
|
7069
6104
|
const reqObj = {
|
|
7070
6105
|
payload: bodyVars,
|
|
7071
6106
|
uriPathVars: pathVars,
|
|
7072
6107
|
uriQuery: queryParams,
|
|
7073
|
-
|
|
6108
|
+
authData: {
|
|
6109
|
+
stsParams,
|
|
6110
|
+
roleName
|
|
6111
|
+
}
|
|
7074
6112
|
};
|
|
7075
6113
|
|
|
7076
6114
|
try {
|
|
7077
6115
|
// Make the call -
|
|
7078
6116
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7079
|
-
return this.
|
|
6117
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHealthCheckStatus', reqObj, true, (irReturnData, irReturnError) => {
|
|
7080
6118
|
// if we received an error or their is no response on the results
|
|
7081
6119
|
// return an error
|
|
7082
6120
|
if (irReturnError) {
|
|
@@ -7138,7 +6176,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7138
6176
|
const meth = 'adapter-getHostedZoneCountSTSRole';
|
|
7139
6177
|
const origin = `${this.id}-${meth}`;
|
|
7140
6178
|
log.trace(origin);
|
|
7141
|
-
const restVer = this.allProps.aws_ver;
|
|
7142
6179
|
|
|
7143
6180
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7144
6181
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7151,7 +6188,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7151
6188
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7152
6189
|
const queryParamsAvailable = {};
|
|
7153
6190
|
const queryParams = {};
|
|
7154
|
-
const pathVars = [
|
|
6191
|
+
const pathVars = [];
|
|
7155
6192
|
const bodyVars = {};
|
|
7156
6193
|
|
|
7157
6194
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7162,35 +6199,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7162
6199
|
}
|
|
7163
6200
|
});
|
|
7164
6201
|
|
|
7165
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7166
|
-
let thisHeaderData = null;
|
|
7167
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7168
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7169
|
-
try {
|
|
7170
|
-
// parse the additional headers object that was passed in
|
|
7171
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7172
|
-
} catch (err) {
|
|
7173
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7174
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7175
|
-
return callback(null, errorObj);
|
|
7176
|
-
}
|
|
7177
|
-
} else if (thisHeaderData === null) {
|
|
7178
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7179
|
-
}
|
|
7180
|
-
|
|
7181
6202
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7182
6203
|
// see adapter code documentation for more information on the request object's fields
|
|
7183
6204
|
const reqObj = {
|
|
7184
6205
|
payload: bodyVars,
|
|
7185
6206
|
uriPathVars: pathVars,
|
|
7186
6207
|
uriQuery: queryParams,
|
|
7187
|
-
|
|
6208
|
+
authData: {
|
|
6209
|
+
stsParams,
|
|
6210
|
+
roleName
|
|
6211
|
+
}
|
|
7188
6212
|
};
|
|
7189
6213
|
|
|
7190
6214
|
try {
|
|
7191
6215
|
// Make the call -
|
|
7192
6216
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7193
|
-
return this.
|
|
6217
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZoneCount', reqObj, true, (irReturnData, irReturnError) => {
|
|
7194
6218
|
// if we received an error or their is no response on the results
|
|
7195
6219
|
// return an error
|
|
7196
6220
|
if (irReturnError) {
|
|
@@ -7256,7 +6280,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7256
6280
|
const meth = 'adapter-getHostedZoneLimitSTSRole';
|
|
7257
6281
|
const origin = `${this.id}-${meth}`;
|
|
7258
6282
|
log.trace(origin);
|
|
7259
|
-
const restVer = this.allProps.aws_ver;
|
|
7260
6283
|
|
|
7261
6284
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7262
6285
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7279,7 +6302,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7279
6302
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7280
6303
|
const queryParamsAvailable = {};
|
|
7281
6304
|
const queryParams = {};
|
|
7282
|
-
const pathVars = [
|
|
6305
|
+
const pathVars = [id, type];
|
|
7283
6306
|
const bodyVars = {};
|
|
7284
6307
|
|
|
7285
6308
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7290,35 +6313,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7290
6313
|
}
|
|
7291
6314
|
});
|
|
7292
6315
|
|
|
7293
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7294
|
-
let thisHeaderData = null;
|
|
7295
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7296
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7297
|
-
try {
|
|
7298
|
-
// parse the additional headers object that was passed in
|
|
7299
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7300
|
-
} catch (err) {
|
|
7301
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7302
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7303
|
-
return callback(null, errorObj);
|
|
7304
|
-
}
|
|
7305
|
-
} else if (thisHeaderData === null) {
|
|
7306
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7307
|
-
}
|
|
7308
|
-
|
|
7309
6316
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7310
6317
|
// see adapter code documentation for more information on the request object's fields
|
|
7311
6318
|
const reqObj = {
|
|
7312
6319
|
payload: bodyVars,
|
|
7313
6320
|
uriPathVars: pathVars,
|
|
7314
6321
|
uriQuery: queryParams,
|
|
7315
|
-
|
|
6322
|
+
authData: {
|
|
6323
|
+
stsParams,
|
|
6324
|
+
roleName
|
|
6325
|
+
}
|
|
7316
6326
|
};
|
|
7317
6327
|
|
|
7318
6328
|
try {
|
|
7319
6329
|
// Make the call -
|
|
7320
6330
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7321
|
-
return this.
|
|
6331
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getHostedZoneLimit', reqObj, true, (irReturnData, irReturnError) => {
|
|
7322
6332
|
// if we received an error or their is no response on the results
|
|
7323
6333
|
// return an error
|
|
7324
6334
|
if (irReturnError) {
|
|
@@ -7384,7 +6394,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7384
6394
|
const meth = 'adapter-getReusableDelegationSetLimitSTSRole';
|
|
7385
6395
|
const origin = `${this.id}-${meth}`;
|
|
7386
6396
|
log.trace(origin);
|
|
7387
|
-
const restVer = this.allProps.aws_ver;
|
|
7388
6397
|
|
|
7389
6398
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7390
6399
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7407,7 +6416,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7407
6416
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7408
6417
|
const queryParamsAvailable = {};
|
|
7409
6418
|
const queryParams = {};
|
|
7410
|
-
const pathVars = [
|
|
6419
|
+
const pathVars = [id, type];
|
|
7411
6420
|
const bodyVars = {};
|
|
7412
6421
|
|
|
7413
6422
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7418,35 +6427,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7418
6427
|
}
|
|
7419
6428
|
});
|
|
7420
6429
|
|
|
7421
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7422
|
-
let thisHeaderData = null;
|
|
7423
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7424
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7425
|
-
try {
|
|
7426
|
-
// parse the additional headers object that was passed in
|
|
7427
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7428
|
-
} catch (err) {
|
|
7429
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7430
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7431
|
-
return callback(null, errorObj);
|
|
7432
|
-
}
|
|
7433
|
-
} else if (thisHeaderData === null) {
|
|
7434
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7435
|
-
}
|
|
7436
|
-
|
|
7437
6430
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7438
6431
|
// see adapter code documentation for more information on the request object's fields
|
|
7439
6432
|
const reqObj = {
|
|
7440
6433
|
payload: bodyVars,
|
|
7441
6434
|
uriPathVars: pathVars,
|
|
7442
6435
|
uriQuery: queryParams,
|
|
7443
|
-
|
|
6436
|
+
authData: {
|
|
6437
|
+
stsParams,
|
|
6438
|
+
roleName
|
|
6439
|
+
}
|
|
7444
6440
|
};
|
|
7445
6441
|
|
|
7446
6442
|
try {
|
|
7447
6443
|
// Make the call -
|
|
7448
6444
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7449
|
-
return this.
|
|
6445
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getReusableDelegationSetLimit', reqObj, true, (irReturnData, irReturnError) => {
|
|
7450
6446
|
// if we received an error or their is no response on the results
|
|
7451
6447
|
// return an error
|
|
7452
6448
|
if (irReturnError) {
|
|
@@ -7508,7 +6504,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7508
6504
|
const meth = 'adapter-getTrafficPolicyInstanceCountSTSRole';
|
|
7509
6505
|
const origin = `${this.id}-${meth}`;
|
|
7510
6506
|
log.trace(origin);
|
|
7511
|
-
const restVer = this.allProps.aws_ver;
|
|
7512
6507
|
|
|
7513
6508
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7514
6509
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7521,7 +6516,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7521
6516
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7522
6517
|
const queryParamsAvailable = {};
|
|
7523
6518
|
const queryParams = {};
|
|
7524
|
-
const pathVars = [
|
|
6519
|
+
const pathVars = [];
|
|
7525
6520
|
const bodyVars = {};
|
|
7526
6521
|
|
|
7527
6522
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7532,35 +6527,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7532
6527
|
}
|
|
7533
6528
|
});
|
|
7534
6529
|
|
|
7535
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7536
|
-
let thisHeaderData = null;
|
|
7537
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7538
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7539
|
-
try {
|
|
7540
|
-
// parse the additional headers object that was passed in
|
|
7541
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7542
|
-
} catch (err) {
|
|
7543
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7544
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7545
|
-
return callback(null, errorObj);
|
|
7546
|
-
}
|
|
7547
|
-
} else if (thisHeaderData === null) {
|
|
7548
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7549
|
-
}
|
|
7550
|
-
|
|
7551
6530
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7552
6531
|
// see adapter code documentation for more information on the request object's fields
|
|
7553
6532
|
const reqObj = {
|
|
7554
6533
|
payload: bodyVars,
|
|
7555
6534
|
uriPathVars: pathVars,
|
|
7556
6535
|
uriQuery: queryParams,
|
|
7557
|
-
|
|
6536
|
+
authData: {
|
|
6537
|
+
stsParams,
|
|
6538
|
+
roleName
|
|
6539
|
+
}
|
|
7558
6540
|
};
|
|
7559
6541
|
|
|
7560
6542
|
try {
|
|
7561
6543
|
// Make the call -
|
|
7562
6544
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7563
|
-
return this.
|
|
6545
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'getTrafficPolicyInstanceCount', reqObj, true, (irReturnData, irReturnError) => {
|
|
7564
6546
|
// if we received an error or their is no response on the results
|
|
7565
6547
|
// return an error
|
|
7566
6548
|
if (irReturnError) {
|
|
@@ -7630,7 +6612,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7630
6612
|
const meth = 'adapter-listGeoLocationsSTSRole';
|
|
7631
6613
|
const origin = `${this.id}-${meth}`;
|
|
7632
6614
|
log.trace(origin);
|
|
7633
|
-
const restVer = this.allProps.aws_ver;
|
|
7634
6615
|
|
|
7635
6616
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7636
6617
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7643,7 +6624,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7643
6624
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7644
6625
|
const queryParamsAvailable = { startcontinentcode, startcountrycode, startsubdivisioncode, maxitems };
|
|
7645
6626
|
const queryParams = {};
|
|
7646
|
-
const pathVars = [
|
|
6627
|
+
const pathVars = [];
|
|
7647
6628
|
const bodyVars = {};
|
|
7648
6629
|
|
|
7649
6630
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7654,35 +6635,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7654
6635
|
}
|
|
7655
6636
|
});
|
|
7656
6637
|
|
|
7657
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7658
|
-
let thisHeaderData = null;
|
|
7659
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7660
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7661
|
-
try {
|
|
7662
|
-
// parse the additional headers object that was passed in
|
|
7663
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7664
|
-
} catch (err) {
|
|
7665
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7666
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7667
|
-
return callback(null, errorObj);
|
|
7668
|
-
}
|
|
7669
|
-
} else if (thisHeaderData === null) {
|
|
7670
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7671
|
-
}
|
|
7672
|
-
|
|
7673
6638
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7674
6639
|
// see adapter code documentation for more information on the request object's fields
|
|
7675
6640
|
const reqObj = {
|
|
7676
6641
|
payload: bodyVars,
|
|
7677
6642
|
uriPathVars: pathVars,
|
|
7678
6643
|
uriQuery: queryParams,
|
|
7679
|
-
|
|
6644
|
+
authData: {
|
|
6645
|
+
stsParams,
|
|
6646
|
+
roleName
|
|
6647
|
+
}
|
|
7680
6648
|
};
|
|
7681
6649
|
|
|
7682
6650
|
try {
|
|
7683
6651
|
// Make the call -
|
|
7684
6652
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7685
|
-
return this.
|
|
6653
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listGeoLocations', reqObj, true, (irReturnData, irReturnError) => {
|
|
7686
6654
|
// if we received an error or their is no response on the results
|
|
7687
6655
|
// return an error
|
|
7688
6656
|
if (irReturnError) {
|
|
@@ -7750,7 +6718,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7750
6718
|
const meth = 'adapter-listHostedZonesByNameSTSRole';
|
|
7751
6719
|
const origin = `${this.id}-${meth}`;
|
|
7752
6720
|
log.trace(origin);
|
|
7753
|
-
const restVer = this.allProps.aws_ver;
|
|
7754
6721
|
|
|
7755
6722
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7756
6723
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7763,7 +6730,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7763
6730
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7764
6731
|
const queryParamsAvailable = { dnsname, hostedzoneid, maxitems };
|
|
7765
6732
|
const queryParams = {};
|
|
7766
|
-
const pathVars = [
|
|
6733
|
+
const pathVars = [];
|
|
7767
6734
|
const bodyVars = {};
|
|
7768
6735
|
|
|
7769
6736
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7774,35 +6741,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7774
6741
|
}
|
|
7775
6742
|
});
|
|
7776
6743
|
|
|
7777
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7778
|
-
let thisHeaderData = null;
|
|
7779
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7780
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7781
|
-
try {
|
|
7782
|
-
// parse the additional headers object that was passed in
|
|
7783
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7784
|
-
} catch (err) {
|
|
7785
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7786
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7787
|
-
return callback(null, errorObj);
|
|
7788
|
-
}
|
|
7789
|
-
} else if (thisHeaderData === null) {
|
|
7790
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7791
|
-
}
|
|
7792
|
-
|
|
7793
6744
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7794
6745
|
// see adapter code documentation for more information on the request object's fields
|
|
7795
6746
|
const reqObj = {
|
|
7796
6747
|
payload: bodyVars,
|
|
7797
6748
|
uriPathVars: pathVars,
|
|
7798
6749
|
uriQuery: queryParams,
|
|
7799
|
-
|
|
6750
|
+
authData: {
|
|
6751
|
+
stsParams,
|
|
6752
|
+
roleName
|
|
6753
|
+
}
|
|
7800
6754
|
};
|
|
7801
6755
|
|
|
7802
6756
|
try {
|
|
7803
6757
|
// Make the call -
|
|
7804
6758
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7805
|
-
return this.
|
|
6759
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZonesByName', reqObj, true, (irReturnData, irReturnError) => {
|
|
7806
6760
|
// if we received an error or their is no response on the results
|
|
7807
6761
|
// return an error
|
|
7808
6762
|
if (irReturnError) {
|
|
@@ -7872,7 +6826,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7872
6826
|
const meth = 'adapter-listHostedZonesByVPCSTSRole';
|
|
7873
6827
|
const origin = `${this.id}-${meth}`;
|
|
7874
6828
|
log.trace(origin);
|
|
7875
|
-
const restVer = this.allProps.aws_ver;
|
|
7876
6829
|
|
|
7877
6830
|
if (this.suspended && this.suspendMode === 'error') {
|
|
7878
6831
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -7895,7 +6848,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7895
6848
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
7896
6849
|
const queryParamsAvailable = { vpcid, vpcregion, maxitems, nexttoken };
|
|
7897
6850
|
const queryParams = {};
|
|
7898
|
-
const pathVars = [
|
|
6851
|
+
const pathVars = [];
|
|
7899
6852
|
const bodyVars = {};
|
|
7900
6853
|
|
|
7901
6854
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -7906,35 +6859,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
7906
6859
|
}
|
|
7907
6860
|
});
|
|
7908
6861
|
|
|
7909
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
7910
|
-
let thisHeaderData = null;
|
|
7911
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
7912
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
7913
|
-
try {
|
|
7914
|
-
// parse the additional headers object that was passed in
|
|
7915
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
7916
|
-
} catch (err) {
|
|
7917
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
7918
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
7919
|
-
return callback(null, errorObj);
|
|
7920
|
-
}
|
|
7921
|
-
} else if (thisHeaderData === null) {
|
|
7922
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
7923
|
-
}
|
|
7924
|
-
|
|
7925
6862
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
7926
6863
|
// see adapter code documentation for more information on the request object's fields
|
|
7927
6864
|
const reqObj = {
|
|
7928
6865
|
payload: bodyVars,
|
|
7929
6866
|
uriPathVars: pathVars,
|
|
7930
6867
|
uriQuery: queryParams,
|
|
7931
|
-
|
|
6868
|
+
authData: {
|
|
6869
|
+
stsParams,
|
|
6870
|
+
roleName
|
|
6871
|
+
}
|
|
7932
6872
|
};
|
|
7933
6873
|
|
|
7934
6874
|
try {
|
|
7935
6875
|
// Make the call -
|
|
7936
6876
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
7937
|
-
return this.
|
|
6877
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listHostedZonesByVPC', reqObj, true, (irReturnData, irReturnError) => {
|
|
7938
6878
|
// if we received an error or their is no response on the results
|
|
7939
6879
|
// return an error
|
|
7940
6880
|
if (irReturnError) {
|
|
@@ -8014,7 +6954,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8014
6954
|
const meth = 'adapter-listResourceRecordSetsSTSRole';
|
|
8015
6955
|
const origin = `${this.id}-${meth}`;
|
|
8016
6956
|
log.trace(origin);
|
|
8017
|
-
const restVer = this.allProps.aws_ver;
|
|
8018
6957
|
|
|
8019
6958
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8020
6959
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8032,7 +6971,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8032
6971
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8033
6972
|
const queryParamsAvailable = { name, type, identifier, maxitems, maxItems, startRecordName, startRecordType, startRecordIdentifier };
|
|
8034
6973
|
const queryParams = {};
|
|
8035
|
-
const pathVars = [
|
|
6974
|
+
const pathVars = [id];
|
|
8036
6975
|
const bodyVars = {};
|
|
8037
6976
|
|
|
8038
6977
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8043,35 +6982,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8043
6982
|
}
|
|
8044
6983
|
});
|
|
8045
6984
|
|
|
8046
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8047
|
-
let thisHeaderData = null;
|
|
8048
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8049
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8050
|
-
try {
|
|
8051
|
-
// parse the additional headers object that was passed in
|
|
8052
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8053
|
-
} catch (err) {
|
|
8054
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8055
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8056
|
-
return callback(null, errorObj);
|
|
8057
|
-
}
|
|
8058
|
-
} else if (thisHeaderData === null) {
|
|
8059
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8060
|
-
}
|
|
8061
|
-
|
|
8062
6985
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8063
6986
|
// see adapter code documentation for more information on the request object's fields
|
|
8064
6987
|
const reqObj = {
|
|
8065
6988
|
payload: bodyVars,
|
|
8066
6989
|
uriPathVars: pathVars,
|
|
8067
6990
|
uriQuery: queryParams,
|
|
8068
|
-
|
|
6991
|
+
authData: {
|
|
6992
|
+
stsParams,
|
|
6993
|
+
roleName
|
|
6994
|
+
}
|
|
8069
6995
|
};
|
|
8070
6996
|
|
|
8071
6997
|
try {
|
|
8072
6998
|
// Make the call -
|
|
8073
6999
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8074
|
-
return this.
|
|
7000
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listResourceRecordSets', reqObj, true, (irReturnData, irReturnError) => {
|
|
8075
7001
|
// if we received an error or their is no response on the results
|
|
8076
7002
|
// return an error
|
|
8077
7003
|
if (irReturnError) {
|
|
@@ -8137,7 +7063,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8137
7063
|
const meth = 'adapter-listTagsForResourcesSTSRole';
|
|
8138
7064
|
const origin = `${this.id}-${meth}`;
|
|
8139
7065
|
log.trace(origin);
|
|
8140
|
-
const restVer = this.allProps.aws_ver;
|
|
8141
7066
|
|
|
8142
7067
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8143
7068
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8160,7 +7085,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8160
7085
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8161
7086
|
const queryParamsAvailable = {};
|
|
8162
7087
|
const queryParams = {};
|
|
8163
|
-
const pathVars = [
|
|
7088
|
+
const pathVars = [resourceType];
|
|
8164
7089
|
const bodyVars = body;
|
|
8165
7090
|
|
|
8166
7091
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8171,35 +7096,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8171
7096
|
}
|
|
8172
7097
|
});
|
|
8173
7098
|
|
|
8174
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8175
|
-
let thisHeaderData = null;
|
|
8176
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8177
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8178
|
-
try {
|
|
8179
|
-
// parse the additional headers object that was passed in
|
|
8180
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8181
|
-
} catch (err) {
|
|
8182
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8183
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8184
|
-
return callback(null, errorObj);
|
|
8185
|
-
}
|
|
8186
|
-
} else if (thisHeaderData === null) {
|
|
8187
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '', contentType: '' };
|
|
8188
|
-
}
|
|
8189
|
-
|
|
8190
7099
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8191
7100
|
// see adapter code documentation for more information on the request object's fields
|
|
8192
7101
|
const reqObj = {
|
|
8193
7102
|
payload: bodyVars,
|
|
8194
7103
|
uriPathVars: pathVars,
|
|
8195
7104
|
uriQuery: queryParams,
|
|
8196
|
-
|
|
7105
|
+
authData: {
|
|
7106
|
+
stsParams,
|
|
7107
|
+
roleName
|
|
7108
|
+
}
|
|
8197
7109
|
};
|
|
8198
7110
|
|
|
8199
7111
|
try {
|
|
8200
7112
|
// Make the call -
|
|
8201
7113
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8202
|
-
return this.
|
|
7114
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTagsForResources', reqObj, true, (irReturnData, irReturnError) => {
|
|
8203
7115
|
// if we received an error or their is no response on the results
|
|
8204
7116
|
// return an error
|
|
8205
7117
|
if (irReturnError) {
|
|
@@ -8265,7 +7177,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8265
7177
|
const meth = 'adapter-listTrafficPoliciesSTSRole';
|
|
8266
7178
|
const origin = `${this.id}-${meth}`;
|
|
8267
7179
|
log.trace(origin);
|
|
8268
|
-
const restVer = this.allProps.aws_ver;
|
|
8269
7180
|
|
|
8270
7181
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8271
7182
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8278,7 +7189,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8278
7189
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8279
7190
|
const queryParamsAvailable = { trafficpolicyid, maxitems };
|
|
8280
7191
|
const queryParams = {};
|
|
8281
|
-
const pathVars = [
|
|
7192
|
+
const pathVars = [];
|
|
8282
7193
|
const bodyVars = {};
|
|
8283
7194
|
|
|
8284
7195
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8289,35 +7200,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8289
7200
|
}
|
|
8290
7201
|
});
|
|
8291
7202
|
|
|
8292
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8293
|
-
let thisHeaderData = null;
|
|
8294
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8295
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8296
|
-
try {
|
|
8297
|
-
// parse the additional headers object that was passed in
|
|
8298
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8299
|
-
} catch (err) {
|
|
8300
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8301
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8302
|
-
return callback(null, errorObj);
|
|
8303
|
-
}
|
|
8304
|
-
} else if (thisHeaderData === null) {
|
|
8305
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8306
|
-
}
|
|
8307
|
-
|
|
8308
7203
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8309
7204
|
// see adapter code documentation for more information on the request object's fields
|
|
8310
7205
|
const reqObj = {
|
|
8311
7206
|
payload: bodyVars,
|
|
8312
7207
|
uriPathVars: pathVars,
|
|
8313
7208
|
uriQuery: queryParams,
|
|
8314
|
-
|
|
7209
|
+
authData: {
|
|
7210
|
+
stsParams,
|
|
7211
|
+
roleName
|
|
7212
|
+
}
|
|
8315
7213
|
};
|
|
8316
7214
|
|
|
8317
7215
|
try {
|
|
8318
7216
|
// Make the call -
|
|
8319
7217
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8320
|
-
return this.
|
|
7218
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicies', reqObj, true, (irReturnData, irReturnError) => {
|
|
8321
7219
|
// if we received an error or their is no response on the results
|
|
8322
7220
|
// return an error
|
|
8323
7221
|
if (irReturnError) {
|
|
@@ -8387,7 +7285,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8387
7285
|
const meth = 'adapter-listTrafficPolicyInstancesSTSRole';
|
|
8388
7286
|
const origin = `${this.id}-${meth}`;
|
|
8389
7287
|
log.trace(origin);
|
|
8390
|
-
const restVer = this.allProps.aws_ver;
|
|
8391
7288
|
|
|
8392
7289
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8393
7290
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8400,7 +7297,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8400
7297
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8401
7298
|
const queryParamsAvailable = { hostedzoneid, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
|
|
8402
7299
|
const queryParams = {};
|
|
8403
|
-
const pathVars = [
|
|
7300
|
+
const pathVars = [];
|
|
8404
7301
|
const bodyVars = {};
|
|
8405
7302
|
|
|
8406
7303
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8411,35 +7308,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8411
7308
|
}
|
|
8412
7309
|
});
|
|
8413
7310
|
|
|
8414
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8415
|
-
let thisHeaderData = null;
|
|
8416
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8417
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8418
|
-
try {
|
|
8419
|
-
// parse the additional headers object that was passed in
|
|
8420
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8421
|
-
} catch (err) {
|
|
8422
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8423
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8424
|
-
return callback(null, errorObj);
|
|
8425
|
-
}
|
|
8426
|
-
} else if (thisHeaderData === null) {
|
|
8427
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8428
|
-
}
|
|
8429
|
-
|
|
8430
7311
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8431
7312
|
// see adapter code documentation for more information on the request object's fields
|
|
8432
7313
|
const reqObj = {
|
|
8433
7314
|
payload: bodyVars,
|
|
8434
7315
|
uriPathVars: pathVars,
|
|
8435
7316
|
uriQuery: queryParams,
|
|
8436
|
-
|
|
7317
|
+
authData: {
|
|
7318
|
+
stsParams,
|
|
7319
|
+
roleName
|
|
7320
|
+
}
|
|
8437
7321
|
};
|
|
8438
7322
|
|
|
8439
7323
|
try {
|
|
8440
7324
|
// Make the call -
|
|
8441
7325
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8442
|
-
return this.
|
|
7326
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstances', reqObj, true, (irReturnData, irReturnError) => {
|
|
8443
7327
|
// if we received an error or their is no response on the results
|
|
8444
7328
|
// return an error
|
|
8445
7329
|
if (irReturnError) {
|
|
@@ -8509,7 +7393,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8509
7393
|
const meth = 'adapter-listTrafficPolicyInstancesByHostedZoneSTSRole';
|
|
8510
7394
|
const origin = `${this.id}-${meth}`;
|
|
8511
7395
|
log.trace(origin);
|
|
8512
|
-
const restVer = this.allProps.aws_ver;
|
|
8513
7396
|
|
|
8514
7397
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8515
7398
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8527,7 +7410,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8527
7410
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8528
7411
|
const queryParamsAvailable = { id, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
|
|
8529
7412
|
const queryParams = {};
|
|
8530
|
-
const pathVars = [
|
|
7413
|
+
const pathVars = [];
|
|
8531
7414
|
const bodyVars = {};
|
|
8532
7415
|
|
|
8533
7416
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8538,35 +7421,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8538
7421
|
}
|
|
8539
7422
|
});
|
|
8540
7423
|
|
|
8541
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8542
|
-
let thisHeaderData = null;
|
|
8543
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8544
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8545
|
-
try {
|
|
8546
|
-
// parse the additional headers object that was passed in
|
|
8547
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8548
|
-
} catch (err) {
|
|
8549
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8550
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8551
|
-
return callback(null, errorObj);
|
|
8552
|
-
}
|
|
8553
|
-
} else if (thisHeaderData === null) {
|
|
8554
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8555
|
-
}
|
|
8556
|
-
|
|
8557
7424
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8558
7425
|
// see adapter code documentation for more information on the request object's fields
|
|
8559
7426
|
const reqObj = {
|
|
8560
7427
|
payload: bodyVars,
|
|
8561
7428
|
uriPathVars: pathVars,
|
|
8562
7429
|
uriQuery: queryParams,
|
|
8563
|
-
|
|
7430
|
+
authData: {
|
|
7431
|
+
stsParams,
|
|
7432
|
+
roleName
|
|
7433
|
+
}
|
|
8564
7434
|
};
|
|
8565
7435
|
|
|
8566
7436
|
try {
|
|
8567
7437
|
// Make the call -
|
|
8568
7438
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8569
|
-
return this.
|
|
7439
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstancesByHostedZone', reqObj, true, (irReturnData, irReturnError) => {
|
|
8570
7440
|
// if we received an error or their is no response on the results
|
|
8571
7441
|
// return an error
|
|
8572
7442
|
if (irReturnError) {
|
|
@@ -8640,7 +7510,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8640
7510
|
const meth = 'adapter-listTrafficPolicyInstancesByPolicySTSRole';
|
|
8641
7511
|
const origin = `${this.id}-${meth}`;
|
|
8642
7512
|
log.trace(origin);
|
|
8643
|
-
const restVer = this.allProps.aws_ver;
|
|
8644
7513
|
|
|
8645
7514
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8646
7515
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8663,7 +7532,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8663
7532
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8664
7533
|
const queryParamsAvailable = { id, version, hostedzoneid, trafficpolicyinstancename, trafficpolicyinstancetype, maxitems };
|
|
8665
7534
|
const queryParams = {};
|
|
8666
|
-
const pathVars = [
|
|
7535
|
+
const pathVars = [];
|
|
8667
7536
|
const bodyVars = {};
|
|
8668
7537
|
|
|
8669
7538
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8674,35 +7543,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8674
7543
|
}
|
|
8675
7544
|
});
|
|
8676
7545
|
|
|
8677
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8678
|
-
let thisHeaderData = null;
|
|
8679
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8680
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8681
|
-
try {
|
|
8682
|
-
// parse the additional headers object that was passed in
|
|
8683
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8684
|
-
} catch (err) {
|
|
8685
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8686
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8687
|
-
return callback(null, errorObj);
|
|
8688
|
-
}
|
|
8689
|
-
} else if (thisHeaderData === null) {
|
|
8690
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8691
|
-
}
|
|
8692
|
-
|
|
8693
7546
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8694
7547
|
// see adapter code documentation for more information on the request object's fields
|
|
8695
7548
|
const reqObj = {
|
|
8696
7549
|
payload: bodyVars,
|
|
8697
7550
|
uriPathVars: pathVars,
|
|
8698
7551
|
uriQuery: queryParams,
|
|
8699
|
-
|
|
7552
|
+
authData: {
|
|
7553
|
+
stsParams,
|
|
7554
|
+
roleName
|
|
7555
|
+
}
|
|
8700
7556
|
};
|
|
8701
7557
|
|
|
8702
7558
|
try {
|
|
8703
7559
|
// Make the call -
|
|
8704
7560
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8705
|
-
return this.
|
|
7561
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyInstancesByPolicy', reqObj, true, (irReturnData, irReturnError) => {
|
|
8706
7562
|
// if we received an error or their is no response on the results
|
|
8707
7563
|
// return an error
|
|
8708
7564
|
if (irReturnError) {
|
|
@@ -8770,7 +7626,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8770
7626
|
const meth = 'adapter-listTrafficPolicyVersionsSTSRole';
|
|
8771
7627
|
const origin = `${this.id}-${meth}`;
|
|
8772
7628
|
log.trace(origin);
|
|
8773
|
-
const restVer = this.allProps.aws_ver;
|
|
8774
7629
|
|
|
8775
7630
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8776
7631
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8788,7 +7643,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8788
7643
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8789
7644
|
const queryParamsAvailable = { trafficpolicyversion, maxitems };
|
|
8790
7645
|
const queryParams = {};
|
|
8791
|
-
const pathVars = [
|
|
7646
|
+
const pathVars = [id];
|
|
8792
7647
|
const bodyVars = {};
|
|
8793
7648
|
|
|
8794
7649
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8799,35 +7654,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8799
7654
|
}
|
|
8800
7655
|
});
|
|
8801
7656
|
|
|
8802
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8803
|
-
let thisHeaderData = null;
|
|
8804
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8805
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8806
|
-
try {
|
|
8807
|
-
// parse the additional headers object that was passed in
|
|
8808
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8809
|
-
} catch (err) {
|
|
8810
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8811
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8812
|
-
return callback(null, errorObj);
|
|
8813
|
-
}
|
|
8814
|
-
} else if (thisHeaderData === null) {
|
|
8815
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8816
|
-
}
|
|
8817
|
-
|
|
8818
7657
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8819
7658
|
// see adapter code documentation for more information on the request object's fields
|
|
8820
7659
|
const reqObj = {
|
|
8821
7660
|
payload: bodyVars,
|
|
8822
7661
|
uriPathVars: pathVars,
|
|
8823
7662
|
uriQuery: queryParams,
|
|
8824
|
-
|
|
7663
|
+
authData: {
|
|
7664
|
+
stsParams,
|
|
7665
|
+
roleName
|
|
7666
|
+
}
|
|
8825
7667
|
};
|
|
8826
7668
|
|
|
8827
7669
|
try {
|
|
8828
7670
|
// Make the call -
|
|
8829
7671
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8830
|
-
return this.
|
|
7672
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'listTrafficPolicyVersions', reqObj, true, (irReturnData, irReturnError) => {
|
|
8831
7673
|
// if we received an error or their is no response on the results
|
|
8832
7674
|
// return an error
|
|
8833
7675
|
if (irReturnError) {
|
|
@@ -8901,7 +7743,6 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8901
7743
|
const meth = 'adapter-testDNSAnswerSTSRole';
|
|
8902
7744
|
const origin = `${this.id}-${meth}`;
|
|
8903
7745
|
log.trace(origin);
|
|
8904
|
-
const restVer = this.allProps.aws_ver;
|
|
8905
7746
|
|
|
8906
7747
|
if (this.suspended && this.suspendMode === 'error') {
|
|
8907
7748
|
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
@@ -8929,7 +7770,7 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8929
7770
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
8930
7771
|
const queryParamsAvailable = { hostedzoneid, recordname, recordtype, resolverip, edns0clientsubnetip, edns0clientsubnetmask };
|
|
8931
7772
|
const queryParams = {};
|
|
8932
|
-
const pathVars = [
|
|
7773
|
+
const pathVars = [];
|
|
8933
7774
|
const bodyVars = {};
|
|
8934
7775
|
|
|
8935
7776
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
@@ -8940,35 +7781,22 @@ class AmazonRoute53 extends AdapterBaseCl {
|
|
|
8940
7781
|
}
|
|
8941
7782
|
});
|
|
8942
7783
|
|
|
8943
|
-
// if you want to expose addlHeaders to workflow, add it to the method signature here and in pronghorn.json
|
|
8944
|
-
let thisHeaderData = null;
|
|
8945
|
-
// if the additional headers was passed in as a string parse the json into an object
|
|
8946
|
-
if (thisHeaderData !== null && thisHeaderData.constructor === String) {
|
|
8947
|
-
try {
|
|
8948
|
-
// parse the additional headers object that was passed in
|
|
8949
|
-
thisHeaderData = JSON.parse(thisHeaderData);
|
|
8950
|
-
} catch (err) {
|
|
8951
|
-
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'addlHeaders string must be a stringified JSON', [], null, null, null);
|
|
8952
|
-
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
8953
|
-
return callback(null, errorObj);
|
|
8954
|
-
}
|
|
8955
|
-
} else if (thisHeaderData === null) {
|
|
8956
|
-
thisHeaderData = { xAmzContentSha256: '', xAmzDate: '', xAmzAlgorithm: '', xAmzCredential: '', xAmzSecurityToken: '', xAmzSignature: '', xAmzSignedHeaders: '' };
|
|
8957
|
-
}
|
|
8958
|
-
|
|
8959
7784
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders, authData, callProperties, filter, priority, event
|
|
8960
7785
|
// see adapter code documentation for more information on the request object's fields
|
|
8961
7786
|
const reqObj = {
|
|
8962
7787
|
payload: bodyVars,
|
|
8963
7788
|
uriPathVars: pathVars,
|
|
8964
7789
|
uriQuery: queryParams,
|
|
8965
|
-
|
|
7790
|
+
authData: {
|
|
7791
|
+
stsParams,
|
|
7792
|
+
roleName
|
|
7793
|
+
}
|
|
8966
7794
|
};
|
|
8967
7795
|
|
|
8968
7796
|
try {
|
|
8969
7797
|
// Make the call -
|
|
8970
7798
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
8971
|
-
return this.
|
|
7799
|
+
return this.requestHandlerInst.identifyRequest('Rest', 'testDNSAnswer', reqObj, true, (irReturnData, irReturnError) => {
|
|
8972
7800
|
// if we received an error or their is no response on the results
|
|
8973
7801
|
// return an error
|
|
8974
7802
|
if (irReturnError) {
|