adding dynamoDB describe call to dynamo integration

This commit is contained in:
Martin McKeaveney 2021-12-29 15:46:33 +00:00
parent c5b066472b
commit b57b0f1c7b
1 changed files with 18 additions and 0 deletions

View File

@ -80,6 +80,17 @@ module DynamoModule {
},
},
},
describe: {
type: QueryTypes.FIELDS,
customisable: true,
readable: true,
fields: {
table: {
type: DatasourceFieldTypes.STRING,
required: true,
},
},
},
get: {
type: QueryTypes.FIELDS,
customisable: true,
@ -180,6 +191,13 @@ module DynamoModule {
return response
}
async describe(query: { table: string; }) {
const params = {
TableName: query.table,
}
return new AWS.DynamoDB().describeTable(params).promise()
}
async get(query: { table: string; json: object }) {
const params = {
TableName: query.table,