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.

128 lines (127 loc) 5.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.STS = void 0; const AssumeRoleCommand_1 = require("./commands/AssumeRoleCommand"); const AssumeRoleWithSAMLCommand_1 = require("./commands/AssumeRoleWithSAMLCommand"); const AssumeRoleWithWebIdentityCommand_1 = require("./commands/AssumeRoleWithWebIdentityCommand"); const DecodeAuthorizationMessageCommand_1 = require("./commands/DecodeAuthorizationMessageCommand"); const GetAccessKeyInfoCommand_1 = require("./commands/GetAccessKeyInfoCommand"); const GetCallerIdentityCommand_1 = require("./commands/GetCallerIdentityCommand"); const GetFederationTokenCommand_1 = require("./commands/GetFederationTokenCommand"); const GetSessionTokenCommand_1 = require("./commands/GetSessionTokenCommand"); const STSClient_1 = require("./STSClient"); class STS extends STSClient_1.STSClient { assumeRole(args, optionsOrCb, cb) { const command = new AssumeRoleCommand_1.AssumeRoleCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } assumeRoleWithSAML(args, optionsOrCb, cb) { const command = new AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } assumeRoleWithWebIdentity(args, optionsOrCb, cb) { const command = new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } decodeAuthorizationMessage(args, optionsOrCb, cb) { const command = new DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } getAccessKeyInfo(args, optionsOrCb, cb) { const command = new GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } getCallerIdentity(args, optionsOrCb, cb) { const command = new GetCallerIdentityCommand_1.GetCallerIdentityCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } getFederationToken(args, optionsOrCb, cb) { const command = new GetFederationTokenCommand_1.GetFederationTokenCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } getSessionToken(args, optionsOrCb, cb) { const command = new GetSessionTokenCommand_1.GetSessionTokenCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } } exports.STS = STS;