UNPKG

@softchef/cdk-iot-device-management

Version:

IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.

28 lines (27 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactGetCommand = void 0; const client_dynamodb_1 = require("@aws-sdk/client-dynamodb"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const utils_1 = require("../commands/utils"); class TransactGetCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; this.inputKeyNodes = [{ key: "TransactItems", children: [{ key: "Get", children: [{ key: "Key" }] }] }]; this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }]; } resolveMiddleware(clientStack, configuration, options) { const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {}; const command = new client_dynamodb_1.TransactGetItemsCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions)); const handler = command.resolveMiddleware(clientStack, configuration, options); return async () => { const data = await handler(command); return { ...data, output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions), }; }; } } exports.TransactGetCommand = TransactGetCommand;