Add WS comprehend detect entities + Load more Lambda functions (#1742)

* Functions are listed recursively if the number of functions exceeds 50

* Added the DetectEntities action to the Aws Comprehend Node
This commit is contained in:
Alexander Mustafin
2021-05-08 06:31:04 +03:00
committed by GitHub
parent 5809b1e098
commit 71ec72493c
2 changed files with 66 additions and 0 deletions

View File

@@ -140,6 +140,27 @@ export class AwsLambda implements INodeType {
value: func.FunctionArn as string,
});
}
if (data.NextMarker) {
let marker: string = data.NextMarker;
while (true) {
const dataLoop = await awsApiRequestREST.call(this, 'lambda', 'GET', `/2015-03-31/functions/?MaxItems=50&Marker=${encodeURIComponent(marker)}`);
for (const func of dataLoop.Functions!) {
returnData.push({
name: func.FunctionName as string,
value: func.FunctionArn as string,
});
}
if (dataLoop.NextMarker) {
marker = dataLoop.NextMarker;
} else {
break;
}
}
}
return returnData;
},
},