@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.
40 lines (39 loc) • 2.04 kB
JavaScript
import { __extends } from "tslib";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { Command as $Command } from "@aws-sdk/smithy-client";
import { AttachPrincipalPolicyRequest } from "../models/models_0";
import { deserializeAws_restJson1AttachPrincipalPolicyCommand, serializeAws_restJson1AttachPrincipalPolicyCommand, } from "../protocols/Aws_restJson1";
var AttachPrincipalPolicyCommand = (function (_super) {
__extends(AttachPrincipalPolicyCommand, _super);
function AttachPrincipalPolicyCommand(input) {
var _this = _super.call(this) || this;
_this.input = input;
return _this;
}
AttachPrincipalPolicyCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
var stack = clientStack.concat(this.middlewareStack);
var logger = configuration.logger;
var clientName = "IoTClient";
var commandName = "AttachPrincipalPolicyCommand";
var handlerExecutionContext = {
logger: logger,
clientName: clientName,
commandName: commandName,
inputFilterSensitiveLog: AttachPrincipalPolicyRequest.filterSensitiveLog,
outputFilterSensitiveLog: function (output) { return output; },
};
var requestHandler = configuration.requestHandler;
return stack.resolve(function (request) {
return requestHandler.handle(request.request, options || {});
}, handlerExecutionContext);
};
AttachPrincipalPolicyCommand.prototype.serialize = function (input, context) {
return serializeAws_restJson1AttachPrincipalPolicyCommand(input, context);
};
AttachPrincipalPolicyCommand.prototype.deserialize = function (output, context) {
return deserializeAws_restJson1AttachPrincipalPolicyCommand(output, context);
};
return AttachPrincipalPolicyCommand;
}($Command));
export { AttachPrincipalPolicyCommand };