[EDIT] FILE: commands.tar
GetFederationTokenCommand.js 0000755 00000004760 15074072521 0012137 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetFederationTokenCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class GetFederationTokenCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetFederationTokenCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "GetFederationTokenCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetFederationTokenRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetFederationTokenResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryGetFederationTokenCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryGetFederationTokenCommand)(output, context); } } exports.GetFederationTokenCommand = GetFederationTokenCommand; GetSessionTokenCommand.js 0000755 00000004722 15074072521 0011500 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetSessionTokenCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class GetSessionTokenCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetSessionTokenCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "GetSessionTokenCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetSessionTokenRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetSessionTokenResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryGetSessionTokenCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryGetSessionTokenCommand)(output, context); } } exports.GetSessionTokenCommand = GetSessionTokenCommand; AssumeRoleWithSAMLCommand.js 0000755 00000004516 15074072521 0012005 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssumeRoleWithSAMLCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class AssumeRoleWithSAMLCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithSAMLCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "AssumeRoleWithSAMLCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand)(output, context); } } exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; GetAccessKeyInfoCommand.js 0000755 00000004734 15074072521 0011545 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetAccessKeyInfoCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class GetAccessKeyInfoCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAccessKeyInfoCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "GetAccessKeyInfoCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand)(output, context); } } exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand; DecodeAuthorizationMessageCommand.js 0000755 00000005100 15074072521 0013654 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DecodeAuthorizationMessageCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class DecodeAuthorizationMessageCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DecodeAuthorizationMessageCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "DecodeAuthorizationMessageCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand)(output, context); } } exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand; AssumeRoleWithWebIdentityCommand.js 0000755 00000004624 15074072521 0013500 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssumeRoleWithWebIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "AssumeRoleWithWebIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand)(output, context); } } exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; GetCallerIdentityCommand.js 0000755 00000004746 15074072521 0011776 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetCallerIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class GetCallerIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetCallerIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "GetCallerIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryGetCallerIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryGetCallerIdentityCommand)(output, context); } } exports.GetCallerIdentityCommand = GetCallerIdentityCommand; AssumeRoleCommand.js 0000755 00000004640 15074072521 0010472 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssumeRoleCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_query_1 = require("../protocols/Aws_query"); class AssumeRoleCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; const commandName = "AssumeRoleCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.AssumeRoleRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.AssumeRoleResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_query_1.serializeAws_queryAssumeRoleCommand)(input, context); } deserialize(output, context) { return (0, Aws_query_1.deserializeAws_queryAssumeRoleCommand)(output, context); } } exports.AssumeRoleCommand = AssumeRoleCommand; index.js 0000755 00000003346 15074072521 0006225 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); tslib_1.__exportStar(require("./CreateIdentityPoolCommand"), exports); tslib_1.__exportStar(require("./DeleteIdentitiesCommand"), exports); tslib_1.__exportStar(require("./DeleteIdentityPoolCommand"), exports); tslib_1.__exportStar(require("./DescribeIdentityCommand"), exports); tslib_1.__exportStar(require("./DescribeIdentityPoolCommand"), exports); tslib_1.__exportStar(require("./GetCredentialsForIdentityCommand"), exports); tslib_1.__exportStar(require("./GetIdCommand"), exports); tslib_1.__exportStar(require("./GetIdentityPoolRolesCommand"), exports); tslib_1.__exportStar(require("./GetOpenIdTokenCommand"), exports); tslib_1.__exportStar(require("./GetOpenIdTokenForDeveloperIdentityCommand"), exports); tslib_1.__exportStar(require("./GetPrincipalTagAttributeMapCommand"), exports); tslib_1.__exportStar(require("./ListIdentitiesCommand"), exports); tslib_1.__exportStar(require("./ListIdentityPoolsCommand"), exports); tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports); tslib_1.__exportStar(require("./LookupDeveloperIdentityCommand"), exports); tslib_1.__exportStar(require("./MergeDeveloperIdentitiesCommand"), exports); tslib_1.__exportStar(require("./SetIdentityPoolRolesCommand"), exports); tslib_1.__exportStar(require("./SetPrincipalTagAttributeMapCommand"), exports); tslib_1.__exportStar(require("./TagResourceCommand"), exports); tslib_1.__exportStar(require("./UnlinkDeveloperIdentityCommand"), exports); tslib_1.__exportStar(require("./UnlinkIdentityCommand"), exports); tslib_1.__exportStar(require("./UntagResourceCommand"), exports); tslib_1.__exportStar(require("./UpdateIdentityPoolCommand"), exports); LogoutCommand.js 0000755 00000004200 15074122363 0007654 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LogoutCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class LogoutCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, LogoutCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; const commandName = "LogoutCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog, outputFilterSensitiveLog: (output) => output, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1LogoutCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1LogoutCommand)(output, context); } } exports.LogoutCommand = LogoutCommand; GetRoleCredentialsCommand.js 0000755 00000004421 15074122363 0012127 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetRoleCredentialsCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class GetRoleCredentialsCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetRoleCredentialsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; const commandName = "GetRoleCredentialsCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1GetRoleCredentialsCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1GetRoleCredentialsCommand)(output, context); } } exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; ListAccountRolesCommand.js 0000755 00000004375 15074122363 0011655 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListAccountRolesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class ListAccountRolesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountRolesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; const commandName = "ListAccountRolesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.ListAccountRolesResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1ListAccountRolesCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1ListAccountRolesCommand)(output, context); } } exports.ListAccountRolesCommand = ListAccountRolesCommand; ListAccountsCommand.js 0000755 00000004325 15074122363 0011026 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListAccountsCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class ListAccountsCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; const commandName = "ListAccountsCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.ListAccountsResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1ListAccountsCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1ListAccountsCommand)(output, context); } } exports.ListAccountsCommand = ListAccountsCommand; ListAccountRolesCommand.d.ts 0000755 00000004036 15074254464 0012113 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { ListAccountRolesRequest, ListAccountRolesResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; export interface ListAccountRolesCommandInput extends ListAccountRolesRequest { } export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer { } /** * <p>Lists all roles that are assigned to the user for a given AWS account.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOClient, ListAccountRolesCommand } from "@aws-sdk/client-sso"; // ES Modules import * // const { SSOClient, ListAccountRolesCommand } = require("@aws-sdk/client-sso"); // CommonJS import * const client = new SSOClient(config); * const command = new ListAccountRolesCommand(input); * const response = await client.send(command); * ``` * * @see {@link ListAccountRolesCommandInput} for command's `input` shape. * @see {@link ListAccountRolesCommandOutput} for command's `response` shape. * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. * */ export declare class ListAccountRolesCommand extends $Command<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig> { readonly input: ListAccountRolesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: ListAccountRolesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListAccountRolesCommandInput, ListAccountRolesCommandOutput>; private serialize; private deserialize; } ListAccountsCommand.d.ts 0000755 00000004377 15074254464 0011301 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; export interface ListAccountsCommandInput extends ListAccountsRequest { } export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer { } /** * <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the * administrator of the account. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers">Assign User Access</a> in the <i>IAM Identity Center User Guide</i>. This operation * returns a paginated response.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso"; // ES Modules import * // const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso"); // CommonJS import * const client = new SSOClient(config); * const command = new ListAccountsCommand(input); * const response = await client.send(command); * ``` * * @see {@link ListAccountsCommandInput} for command's `input` shape. * @see {@link ListAccountsCommandOutput} for command's `response` shape. * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. * */ export declare class ListAccountsCommand extends $Command<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig> { readonly input: ListAccountsCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: ListAccountsCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListAccountsCommandInput, ListAccountsCommandOutput>; private serialize; private deserialize; } index.d.ts 0000755 00000002041 15074254464 0006460 0 ustar 00 export * from "./CreateIdentityPoolCommand"; export * from "./DeleteIdentitiesCommand"; export * from "./DeleteIdentityPoolCommand"; export * from "./DescribeIdentityCommand"; export * from "./DescribeIdentityPoolCommand"; export * from "./GetCredentialsForIdentityCommand"; export * from "./GetIdCommand"; export * from "./GetIdentityPoolRolesCommand"; export * from "./GetOpenIdTokenCommand"; export * from "./GetOpenIdTokenForDeveloperIdentityCommand"; export * from "./GetPrincipalTagAttributeMapCommand"; export * from "./ListIdentitiesCommand"; export * from "./ListIdentityPoolsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./LookupDeveloperIdentityCommand"; export * from "./MergeDeveloperIdentitiesCommand"; export * from "./SetIdentityPoolRolesCommand"; export * from "./SetPrincipalTagAttributeMapCommand"; export * from "./TagResourceCommand"; export * from "./UnlinkDeveloperIdentityCommand"; export * from "./UnlinkIdentityCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateIdentityPoolCommand"; GetRoleCredentialsCommand.d.ts 0000755 00000004137 15074254464 0012377 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest { } export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer { } /** * <p>Returns the STS short-term credentials for a given role name that is assigned to the * user.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOClient, GetRoleCredentialsCommand } from "@aws-sdk/client-sso"; // ES Modules import * // const { SSOClient, GetRoleCredentialsCommand } = require("@aws-sdk/client-sso"); // CommonJS import * const client = new SSOClient(config); * const command = new GetRoleCredentialsCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetRoleCredentialsCommandInput} for command's `input` shape. * @see {@link GetRoleCredentialsCommandOutput} for command's `response` shape. * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. * */ export declare class GetRoleCredentialsCommand extends $Command<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig> { readonly input: GetRoleCredentialsCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetRoleCredentialsCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput>; private serialize; private deserialize; } LogoutCommand.d.ts 0000755 00000005567 15074254464 0010141 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { LogoutRequest } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient"; export interface LogoutCommandInput extends LogoutRequest { } export interface LogoutCommandOutput extends __MetadataBearer { } /** * <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to * the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in * session.</p> * * <note> * <p>If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is * used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set. * More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user, * and the corresponding temporary AWS credentials are returned to the client.</p> * * <p>After user logout, any existing IAM role sessions that were created by using IAM Identity Center * permission sets continue based on the duration configured in the permission set. * For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User * authentications</a> in the <i>IAM Identity Center User * Guide</i>.</p> * </note> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOClient, LogoutCommand } from "@aws-sdk/client-sso"; // ES Modules import * // const { SSOClient, LogoutCommand } = require("@aws-sdk/client-sso"); // CommonJS import * const client = new SSOClient(config); * const command = new LogoutCommand(input); * const response = await client.send(command); * ``` * * @see {@link LogoutCommandInput} for command's `input` shape. * @see {@link LogoutCommandOutput} for command's `response` shape. * @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape. * */ export declare class LogoutCommand extends $Command<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig> { readonly input: LogoutCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: LogoutCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<LogoutCommandInput, LogoutCommandOutput>; private serialize; private deserialize; } CreateTokenCommand.js 0000755 00000004317 15074302730 0010616 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateTokenCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class CreateTokenCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; const commandName = "CreateTokenCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.CreateTokenRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.CreateTokenResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1CreateTokenCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1CreateTokenCommand)(output, context); } } exports.CreateTokenCommand = CreateTokenCommand; RegisterClientCommand.js 0000755 00000004355 15074302730 0011337 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RegisterClientCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class RegisterClientCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, RegisterClientCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; const commandName = "RegisterClientCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.RegisterClientRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.RegisterClientResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1RegisterClientCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1RegisterClientCommand)(output, context); } } exports.RegisterClientCommand = RegisterClientCommand; StartDeviceAuthorizationCommand.js 0000755 00000004521 15074302730 0013405 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StartDeviceAuthorizationCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_restJson1_1 = require("../protocols/Aws_restJson1"); class StartDeviceAuthorizationCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOOIDCClient"; const commandName = "StartDeviceAuthorizationCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.StartDeviceAuthorizationResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_restJson1_1.serializeAws_restJson1StartDeviceAuthorizationCommand)(input, context); } deserialize(output, context) { return (0, Aws_restJson1_1.deserializeAws_restJson1StartDeviceAuthorizationCommand)(output, context); } } exports.StartDeviceAuthorizationCommand = StartDeviceAuthorizationCommand; CreateTokenCommand.d.ts 0000755 00000004154 15074310647 0011057 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CreateTokenRequest, CreateTokenResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; export interface CreateTokenCommandInput extends CreateTokenRequest { } export interface CreateTokenCommandOutput extends CreateTokenResponse, __MetadataBearer { } /** * <p>Creates and returns an access token for the authorized client. The access token issued * will be used to fetch short-term credentials for the assigned roles in the AWS * account.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOOIDCClient, CreateTokenCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import * // const { SSOOIDCClient, CreateTokenCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import * const client = new SSOOIDCClient(config); * const command = new CreateTokenCommand(input); * const response = await client.send(command); * ``` * * @see {@link CreateTokenCommandInput} for command's `input` shape. * @see {@link CreateTokenCommandOutput} for command's `response` shape. * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. * */ export declare class CreateTokenCommand extends $Command<CreateTokenCommandInput, CreateTokenCommandOutput, SSOOIDCClientResolvedConfig> { readonly input: CreateTokenCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: CreateTokenCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOOIDCClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateTokenCommandInput, CreateTokenCommandOutput>; private serialize; private deserialize; } RegisterClientCommand.d.ts 0000755 00000004234 15074310647 0011575 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { RegisterClientRequest, RegisterClientResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; export interface RegisterClientCommandInput extends RegisterClientRequest { } export interface RegisterClientCommandOutput extends RegisterClientResponse, __MetadataBearer { } /** * <p>Registers a client with IAM Identity Center. This allows clients to initiate device authorization. * The output should be persisted for reuse through many authentication requests.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOOIDCClient, RegisterClientCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import * // const { SSOOIDCClient, RegisterClientCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import * const client = new SSOOIDCClient(config); * const command = new RegisterClientCommand(input); * const response = await client.send(command); * ``` * * @see {@link RegisterClientCommandInput} for command's `input` shape. * @see {@link RegisterClientCommandOutput} for command's `response` shape. * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. * */ export declare class RegisterClientCommand extends $Command<RegisterClientCommandInput, RegisterClientCommandOutput, SSOOIDCClientResolvedConfig> { readonly input: RegisterClientCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: RegisterClientCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOOIDCClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RegisterClientCommandInput, RegisterClientCommandOutput>; private serialize; private deserialize; } StartDeviceAuthorizationCommand.d.ts 0000755 00000004410 15074310647 0013644 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { StartDeviceAuthorizationRequest, StartDeviceAuthorizationResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient"; export interface StartDeviceAuthorizationCommandInput extends StartDeviceAuthorizationRequest { } export interface StartDeviceAuthorizationCommandOutput extends StartDeviceAuthorizationResponse, __MetadataBearer { } /** * <p>Initiates device authorization by requesting a pair of verification codes from the * authorization service.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SSOOIDCClient, StartDeviceAuthorizationCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import * // const { SSOOIDCClient, StartDeviceAuthorizationCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import * const client = new SSOOIDCClient(config); * const command = new StartDeviceAuthorizationCommand(input); * const response = await client.send(command); * ``` * * @see {@link StartDeviceAuthorizationCommandInput} for command's `input` shape. * @see {@link StartDeviceAuthorizationCommandOutput} for command's `response` shape. * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape. * */ export declare class StartDeviceAuthorizationCommand extends $Command<StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput, SSOOIDCClientResolvedConfig> { readonly input: StartDeviceAuthorizationCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: StartDeviceAuthorizationCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOOIDCClientResolvedConfig, options?: __HttpHandlerOptions): Handler<StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput>; private serialize; private deserialize; } AssumeRoleWithSAMLCommand.d.ts 0000755 00000030103 15074313665 0012237 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface AssumeRoleWithSAMLCommandInput extends AssumeRoleWithSAMLRequest { } export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLResponse, __MetadataBearer { } /** * <p>Returns a set of temporary security credentials for users who have been authenticated * via a SAML authentication response. This operation provides a mechanism for tying an * enterprise identity store or directory to role-based Amazon Web Services access without user-specific * credentials or configuration. For a comparison of <code>AssumeRoleWithSAML</code> with the * other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p> * <p>The temporary security credentials returned by this operation consist of an access key * ID, a secret access key, and a security token. Applications can use these temporary * security credentials to sign calls to Amazon Web Services services.</p> * <p> * <b>Session Duration</b> * </p> * <p>By default, the temporary security credentials created by * <code>AssumeRoleWithSAML</code> last for one hour. However, you can use the optional * <code>DurationSeconds</code> parameter to specify the duration of your session. Your * role session lasts for the duration that you specify, or until the time specified in the * SAML authentication response's <code>SessionNotOnOrAfter</code> value, whichever is * shorter. You can provide a <code>DurationSeconds</code> value from 900 seconds (15 minutes) * up to the maximum session duration setting for the role. This setting can have a value from * 1 hour to 12 hours. To learn how to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the * Maximum Session Duration Setting for a Role</a> in the * <i>IAM User Guide</i>. The maximum session duration limit applies when * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI * commands. However the limit does not apply when you use those operations to create a * console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the * <i>IAM User Guide</i>.</p> * <note> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining">Role chaining</a> limits your CLI or Amazon Web Services API role * session to a maximum of one hour. When you use the <code>AssumeRole</code> API operation * to assume a role, you can specify the duration of your role session with the * <code>DurationSeconds</code> parameter. You can specify a parameter value of up to * 43200 seconds (12 hours), depending on the maximum session duration setting for your * role. However, if you assume a role using role chaining and provide a * <code>DurationSeconds</code> parameter value greater than one hour, the operation * fails.</p> * </note> * <p> * <b>Permissions</b> * </p> * <p>The temporary security credentials created by <code>AssumeRoleWithSAML</code> can be * used to make API calls to any Amazon Web Services service with the following exception: you cannot call * the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API * operations.</p> * <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to * this operation. You can pass a single JSON policy document to use as an inline session * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as * managed session policies. The plaintext that you use for both inline and managed session * policies can't exceed 2,048 characters. Passing policies to this operation returns new * temporary credentials. The resulting session's permissions are the intersection of the * role's identity-based policy and the session policies. You can use the role's temporary * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns * the role. You cannot use session policies to grant more permissions than those allowed * by the identity-based policy of the role that is being assumed. For more information, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session * Policies</a> in the <i>IAM User Guide</i>.</p> * <p>Calling <code>AssumeRoleWithSAML</code> does not require the use of Amazon Web Services security * credentials. The identity of the caller is validated by using keys in the metadata document * that is uploaded for the SAML provider entity for your identity provider. </p> * <important> * <p>Calling <code>AssumeRoleWithSAML</code> can result in an entry in your CloudTrail logs. * The entry includes the value in the <code>NameID</code> element of the SAML assertion. * We recommend that you use a <code>NameIDType</code> that is not associated with any * personally identifiable information (PII). For example, you could instead use the * persistent identifier * (<code>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</code>).</p> * </important> * <p> * <b>Tags</b> * </p> * <p>(Optional) You can configure your IdP to pass attributes into your SAML assertion as * session tags. Each session tag consists of a key name and an associated value. For more * information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the * <i>IAM User Guide</i>.</p> * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128 * characters and the values can’t exceed 256 characters. For these and additional limits, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p> * * <note> * <p>An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, * and session tags into a packed binary format that has a separate limit. Your request can * fail for this limit even if your plaintext meets the other requirements. The * <code>PackedPolicySize</code> response element indicates by percentage how close the * policies and tags for your request are to the upper size limit.</p> * </note> * * <p>You can pass a session tag with the same key as a tag that is attached to the role. When * you do, session tags override the role's tags with the same key.</p> * <p>An administrator must grant you the permissions necessary to pass session tags. The * administrator can also create granular permissions to allow you to pass only specific * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags * for Attribute-Based Access Control</a> in the * <i>IAM User Guide</i>.</p> * <p>You can set the session tags as transitive. Transitive tags persist during role * chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles * with Session Tags</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>SAML Configuration</b> * </p> * <p>Before your application can call <code>AssumeRoleWithSAML</code>, you must configure * your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you * must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that * represents your identity provider. You must also create an IAM role that specifies this * SAML provider in its trust policy. </p> * <p>For more information, see the following resources:</p> * <ul> * <li> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html">About * SAML 2.0-based Federation</a> in the <i>IAM User Guide</i>. * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html">Creating SAML Identity Providers</a> in the * <i>IAM User Guide</i>. </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html">Configuring * a Relying Party and Claims</a> in the <i>IAM User Guide</i>. * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html">Creating a Role for SAML 2.0 Federation</a> in the * <i>IAM User Guide</i>. </p> * </li> * </ul> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, AssumeRoleWithSAMLCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, AssumeRoleWithSAMLCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new AssumeRoleWithSAMLCommand(input); * const response = await client.send(command); * ``` * * @see {@link AssumeRoleWithSAMLCommandInput} for command's `input` shape. * @see {@link AssumeRoleWithSAMLCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class AssumeRoleWithSAMLCommand extends $Command<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig> { readonly input: AssumeRoleWithSAMLCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: AssumeRoleWithSAMLCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput>; private serialize; private deserialize; } DecodeAuthorizationMessageCommand.d.ts 0000755 00000010712 15074313665 0014124 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { DecodeAuthorizationMessageRequest, DecodeAuthorizationMessageResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface DecodeAuthorizationMessageCommandInput extends DecodeAuthorizationMessageRequest { } export interface DecodeAuthorizationMessageCommandOutput extends DecodeAuthorizationMessageResponse, __MetadataBearer { } /** * <p>Decodes additional information about the authorization status of a request from an * encoded message returned in response to an Amazon Web Services request.</p> * <p>For example, if a user is not authorized to perform an operation that he or she has * requested, the request returns a <code>Client.UnauthorizedOperation</code> response (an * HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can * provide details about this authorization failure. </p> * <note> * <p>Only certain Amazon Web Services operations return an encoded authorization message. The * documentation for an individual operation indicates whether that operation returns an * encoded message in addition to returning an HTTP code.</p> * </note> * <p>The message is encoded because the details of the authorization status can contain * privileged information that the user who requested the operation should not see. To decode * an authorization status message, a user must be granted permissions through an IAM <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">policy</a> to * request the <code>DecodeAuthorizationMessage</code> * (<code>sts:DecodeAuthorizationMessage</code>) action. </p> * <p>The decoded message includes the following type of information:</p> * <ul> * <li> * <p>Whether the request was denied due to an explicit deny or due to the absence of an * explicit allow. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow">Determining Whether a Request is Allowed or Denied</a> in the * <i>IAM User Guide</i>. </p> * </li> * <li> * <p>The principal who made the request.</p> * </li> * <li> * <p>The requested action.</p> * </li> * <li> * <p>The requested resource.</p> * </li> * <li> * <p>The values of condition keys in the context of the user's request.</p> * </li> * </ul> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, DecodeAuthorizationMessageCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, DecodeAuthorizationMessageCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new DecodeAuthorizationMessageCommand(input); * const response = await client.send(command); * ``` * * @see {@link DecodeAuthorizationMessageCommandInput} for command's `input` shape. * @see {@link DecodeAuthorizationMessageCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class DecodeAuthorizationMessageCommand extends $Command<DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput, STSClientResolvedConfig> { readonly input: DecodeAuthorizationMessageCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: DecodeAuthorizationMessageCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput>; private serialize; private deserialize; } GetSessionTokenCommand.d.ts 0000755 00000015110 15074313665 0011734 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { GetSessionTokenRequest, GetSessionTokenResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface GetSessionTokenCommandInput extends GetSessionTokenRequest { } export interface GetSessionTokenCommandOutput extends GetSessionTokenResponse, __MetadataBearer { } /** * <p>Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The * credentials consist of an access key ID, a secret access key, and a security token. * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect * programmatic calls to specific Amazon Web Services API operations like Amazon EC2 <code>StopInstances</code>. * MFA-enabled IAM users would need to call <code>GetSessionToken</code> and submit an MFA * code that is associated with their MFA device. Using the temporary security credentials * that are returned from the call, IAM users can then make programmatic calls to API * operations that require MFA authentication. If you do not supply a correct MFA code, then * the API returns an access denied error. For a comparison of <code>GetSessionToken</code> * with the other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p> * <note> * <p>No permissions are required for users to perform this operation. The purpose of the * <code>sts:GetSessionToken</code> operation is to authenticate the user using MFA. You * cannot use policies to control authentication operations. For more information, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html">Permissions for GetSessionToken</a> in the * <i>IAM User Guide</i>.</p> * </note> * <p> * <b>Session Duration</b> * </p> * <p>The <code>GetSessionToken</code> operation must be called by using the long-term Amazon Web Services * security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are * created by IAM users are valid for the duration that you specify. This duration can range * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900 * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p> * <p> * <b>Permissions</b> * </p> * <p>The temporary security credentials created by <code>GetSessionToken</code> can be used * to make API calls to any Amazon Web Services service with the following exceptions:</p> * <ul> * <li> * <p>You cannot call any IAM API operations unless MFA authentication information is * included in the request.</p> * </li> * <li> * <p>You cannot call any STS API <i>except</i> * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p> * </li> * </ul> * <note> * <p>We recommend that you do not call <code>GetSessionToken</code> with Amazon Web Services account * root user credentials. Instead, follow our <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users">best practices</a> by * creating one or more IAM users, giving them the necessary permissions, and using IAM * users for everyday interaction with Amazon Web Services. </p> * </note> * <p>The credentials that are returned by <code>GetSessionToken</code> are based on * permissions associated with the user whose credentials were used to call the operation. If * <code>GetSessionToken</code> is called using Amazon Web Services account root user credentials, the * temporary credentials have root user permissions. Similarly, if * <code>GetSessionToken</code> is called using the credentials of an IAM user, the * temporary credentials have the same permissions as the IAM user. </p> * <p>For more information about using <code>GetSessionToken</code> to create temporary * credentials, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary * Credentials for Users in Untrusted Environments</a> in the * <i>IAM User Guide</i>. </p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, GetSessionTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, GetSessionTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new GetSessionTokenCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetSessionTokenCommandInput} for command's `input` shape. * @see {@link GetSessionTokenCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class GetSessionTokenCommand extends $Command<GetSessionTokenCommandInput, GetSessionTokenCommandOutput, STSClientResolvedConfig> { readonly input: GetSessionTokenCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetSessionTokenCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetSessionTokenCommandInput, GetSessionTokenCommandOutput>; private serialize; private deserialize; } AssumeRoleCommand.d.ts 0000755 00000021747 15074313665 0010744 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface AssumeRoleCommandInput extends AssumeRoleRequest { } export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer { } /** * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services * resources that you might not normally have access to. These temporary credentials consist * of an access key ID, a secret access key, and a security token. Typically, you use * <code>AssumeRole</code> within your account or for cross-account access. For a * comparison of <code>AssumeRole</code> with other API operations that produce temporary * credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>Permissions</b> * </p> * <p>The temporary security credentials created by <code>AssumeRole</code> can be used to * make API calls to any Amazon Web Services service with the following exception: You cannot call the * Amazon Web Services STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API * operations.</p> * <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to * this operation. You can pass a single JSON policy document to use as an inline session * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as * managed session policies. The plaintext that you use for both inline and managed session * policies can't exceed 2,048 characters. Passing policies to this operation returns new * temporary credentials. The resulting session's permissions are the intersection of the * role's identity-based policy and the session policies. You can use the role's temporary * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns * the role. You cannot use session policies to grant more permissions than those allowed * by the identity-based policy of the role that is being assumed. For more information, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session * Policies</a> in the <i>IAM User Guide</i>.</p> * <p>When you create a role, you create two policies: A role trust policy that specifies * <i>who</i> can assume the role and a permissions policy that specifies * <i>what</i> can be done with the role. You specify the trusted principal * who is allowed to assume the role in the role trust policy.</p> * <p>To assume a role from a different account, your Amazon Web Services account must be trusted by the * role. The trust relationship is defined in the role's trust policy when the role is * created. That trust policy states which accounts are allowed to delegate that access to * users in the account. </p> * <p>A user who wants to access a role in a different account must also have permissions that * are delegated from the user account administrator. The administrator must attach a policy * that allows the user to call <code>AssumeRole</code> for the ARN of the role in the other * account.</p> * <p>To allow a user to assume a role in the same account, you can do either of the * following:</p> * <ul> * <li> * <p>Attach a policy to the user that allows the user to call <code>AssumeRole</code> * (as long as the role's trust policy trusts the account).</p> * </li> * <li> * <p>Add the user as a principal directly in the role's trust policy.</p> * </li> * </ul> * <p>You can do either because the role’s trust policy acts as an IAM resource-based * policy. When a resource-based policy grants access to a principal in the same account, no * additional identity-based policy is required. For more information about trust policies and * resource-based policies, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">IAM Policies</a> in the * <i>IAM User Guide</i>.</p> * * <p> * <b>Tags</b> * </p> * <p>(Optional) You can pass tag key-value pairs to your session. These tags are called * session tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the * <i>IAM User Guide</i>.</p> * <p>An administrator must grant you the permissions necessary to pass session tags. The * administrator can also create granular permissions to allow you to pass only specific * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags * for Attribute-Based Access Control</a> in the * <i>IAM User Guide</i>.</p> * <p>You can set the session tags as transitive. Transitive tags persist during role * chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles * with Session Tags</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>Using MFA with AssumeRole</b> * </p> * <p>(Optional) You can include multi-factor authentication (MFA) information when you call * <code>AssumeRole</code>. This is useful for cross-account scenarios to ensure that the * user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that * scenario, the trust policy of the role being assumed includes a condition that tests for * MFA authentication. If the caller does not include valid MFA information, the request to * assume the role is denied. The condition in a trust policy that tests for MFA * authentication might look like the following example.</p> * <p> * <code>"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}</code> * </p> * <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html">Configuring MFA-Protected API Access</a> * in the <i>IAM User Guide</i> guide.</p> * <p>To use MFA with <code>AssumeRole</code>, you pass values for the * <code>SerialNumber</code> and <code>TokenCode</code> parameters. The * <code>SerialNumber</code> value identifies the user's hardware or virtual MFA device. * The <code>TokenCode</code> is the time-based one-time password (TOTP) that the MFA device * produces. </p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, AssumeRoleCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, AssumeRoleCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new AssumeRoleCommand(input); * const response = await client.send(command); * ``` * * @see {@link AssumeRoleCommandInput} for command's `input` shape. * @see {@link AssumeRoleCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class AssumeRoleCommand extends $Command<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig> { readonly input: AssumeRoleCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: AssumeRoleCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleCommandInput, AssumeRoleCommandOutput>; private serialize; private deserialize; } GetFederationTokenCommand.d.ts 0000755 00000022743 15074313665 0012403 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { GetFederationTokenRequest, GetFederationTokenResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface GetFederationTokenCommandInput extends GetFederationTokenRequest { } export interface GetFederationTokenCommandOutput extends GetFederationTokenResponse, __MetadataBearer { } /** * <p>Returns a set of temporary security credentials (consisting of an access key ID, a * secret access key, and a security token) for a federated user. A typical use is in a proxy * application that gets temporary security credentials on behalf of distributed applications * inside a corporate network. You must call the <code>GetFederationToken</code> operation * using the long-term security credentials of an IAM user. As a result, this call is * appropriate in contexts where those credentials can be safely stored, usually in a * server-based application. For a comparison of <code>GetFederationToken</code> with the * other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p> * <note> * <p>You can create a mobile-based or browser-based app that can authenticate users using * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or * <code>AssumeRoleWithWebIdentity</code>. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a> in the * <i>IAM User Guide</i>.</p> * </note> * <p>You can also call <code>GetFederationToken</code> using the security credentials of an * Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create * an IAM user for the purpose of the proxy application. Then attach a policy to the IAM * user that limits federated users to only the actions and resources that they need to * access. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">IAM Best Practices</a> in the * <i>IAM User Guide</i>. </p> * <p> * <b>Session duration</b> * </p> * <p>The temporary credentials are valid for the specified duration, from 900 seconds (15 * minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is * 43,200 seconds (12 hours). Temporary credentials obtained by using the Amazon Web Services account root * user credentials have a maximum duration of 3,600 seconds (1 hour).</p> * <p> * <b>Permissions</b> * </p> * <p>You can use the temporary credentials created by <code>GetFederationToken</code> in any * Amazon Web Services service except the following:</p> * <ul> * <li> * <p>You cannot call any IAM operations using the CLI or the Amazon Web Services API. </p> * </li> * <li> * <p>You cannot call any STS operations except <code>GetCallerIdentity</code>.</p> * </li> * </ul> * <p>You must pass an inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policy</a> to * this operation. You can pass a single JSON policy document to use as an inline session * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as * managed session policies. The plaintext that you use for both inline and managed session * policies can't exceed 2,048 characters.</p> * <p>Though the session policy parameters are optional, if you do not pass a policy, then the * resulting federated user session has no permissions. When you pass session policies, the * session permissions are the intersection of the IAM user policies and the session * policies that you pass. This gives you a way to further restrict the permissions for a * federated user. You cannot use session policies to grant more permissions than those that * are defined in the permissions policy of the IAM user. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session * Policies</a> in the <i>IAM User Guide</i>. For information about * using <code>GetFederationToken</code> to create temporary security credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken">GetFederationToken—Federation Through a Custom Identity Broker</a>. </p> * <p>You can use the credentials to access a resource that has a resource-based policy. If * that policy specifically references the federated user session in the * <code>Principal</code> element of the policy, the session has the permissions allowed by * the policy. These permissions are granted in addition to the permissions granted by the * session policies.</p> * <p> * <b>Tags</b> * </p> * <p>(Optional) You can pass tag key-value pairs to your session. These are called session * tags. For more information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the * <i>IAM User Guide</i>.</p> * <note> * <p>You can create a mobile-based or browser-based app that can authenticate users using * a web identity provider like Login with Amazon, Facebook, Google, or an OpenID * Connect-compatible identity provider. In this case, we recommend that you use <a href="http://aws.amazon.com/cognito/">Amazon Cognito</a> or * <code>AssumeRoleWithWebIdentity</code>. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a> in the * <i>IAM User Guide</i>.</p> * </note> * <p>An administrator must grant you the permissions necessary to pass session tags. The * administrator can also create granular permissions to allow you to pass only specific * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags * for Attribute-Based Access Control</a> in the * <i>IAM User Guide</i>.</p> * <p>Tag key–value pairs are not case sensitive, but case is preserved. This means that you * cannot have separate <code>Department</code> and <code>department</code> tag keys. Assume * that the user that you are federating has the * <code>Department</code>=<code>Marketing</code> tag and you pass the * <code>department</code>=<code>engineering</code> session tag. <code>Department</code> * and <code>department</code> are not saved as separate tags, and the session tag passed in * the request takes precedence over the user tag.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, GetFederationTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, GetFederationTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new GetFederationTokenCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetFederationTokenCommandInput} for command's `input` shape. * @see {@link GetFederationTokenCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class GetFederationTokenCommand extends $Command<GetFederationTokenCommandInput, GetFederationTokenCommandOutput, STSClientResolvedConfig> { readonly input: GetFederationTokenCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetFederationTokenCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetFederationTokenCommandInput, GetFederationTokenCommandOutput>; private serialize; private deserialize; } AssumeRoleWithWebIdentityCommand.d.ts 0000755 00000032714 15074313665 0013744 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWebIdentityRequest { } export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer { } /** * <p>Returns a set of temporary security credentials for users who have been authenticated in * a mobile or web application with a web identity provider. Example providers include the * OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible * identity provider such as Google or <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito federated identities</a>.</p> * <note> * <p>For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the * <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and the <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a> to uniquely * identify a user. You can also supply the user with a consistent identity throughout the * lifetime of an application.</p> * <p>To learn more about Amazon Cognito, see <a href="https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840">Amazon Cognito Overview</a> in * <i>Amazon Web Services SDK for Android Developer Guide</i> and <a href="https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664">Amazon Cognito Overview</a> in the * <i>Amazon Web Services SDK for iOS Developer Guide</i>.</p> * </note> * <p>Calling <code>AssumeRoleWithWebIdentity</code> does not require the use of Amazon Web Services * security credentials. Therefore, you can distribute an application (for example, on mobile * devices) that requests temporary security credentials without including long-term Amazon Web Services * credentials in the application. You also don't need to deploy server-based proxy services * that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by * using a token from the web identity provider. For a comparison of * <code>AssumeRoleWithWebIdentity</code> with the other API operations that produce * temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting Temporary Security * Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * Amazon Web Services STS API operations</a> in the <i>IAM User Guide</i>.</p> * <p>The temporary security credentials returned by this API consist of an access key ID, a * secret access key, and a security token. Applications can use these temporary security * credentials to sign calls to Amazon Web Services service API operations.</p> * <p> * <b>Session Duration</b> * </p> * <p>By default, the temporary security credentials created by * <code>AssumeRoleWithWebIdentity</code> last for one hour. However, you can use the * optional <code>DurationSeconds</code> parameter to specify the duration of your session. * You can provide a value from 900 seconds (15 minutes) up to the maximum session duration * setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how * to view the maximum value for your role, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View the * Maximum Session Duration Setting for a Role</a> in the * <i>IAM User Guide</i>. The maximum session duration limit applies when * you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI * commands. However the limit does not apply when you use those operations to create a * console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM Roles</a> in the * <i>IAM User Guide</i>. </p> * <p> * <b>Permissions</b> * </p> * <p>The temporary security credentials created by <code>AssumeRoleWithWebIdentity</code> can * be used to make API calls to any Amazon Web Services service with the following exception: you cannot * call the STS <code>GetFederationToken</code> or <code>GetSessionToken</code> API * operations.</p> * <p>(Optional) You can pass inline or managed <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">session policies</a> to * this operation. You can pass a single JSON policy document to use as an inline session * policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as * managed session policies. The plaintext that you use for both inline and managed session * policies can't exceed 2,048 characters. Passing policies to this operation returns new * temporary credentials. The resulting session's permissions are the intersection of the * role's identity-based policy and the session policies. You can use the role's temporary * credentials in subsequent Amazon Web Services API calls to access resources in the account that owns * the role. You cannot use session policies to grant more permissions than those allowed * by the identity-based policy of the role that is being assumed. For more information, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session">Session * Policies</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>Tags</b> * </p> * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as * session tags. Each session tag consists of a key name and an associated value. For more * information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the * <i>IAM User Guide</i>.</p> * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128 * characters and the values can’t exceed 256 characters. For these and additional limits, see * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length">IAM * and STS Character Limits</a> in the <i>IAM User Guide</i>.</p> * * <note> * <p>An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs, * and session tags into a packed binary format that has a separate limit. Your request can * fail for this limit even if your plaintext meets the other requirements. The * <code>PackedPolicySize</code> response element indicates by percentage how close the * policies and tags for your request are to the upper size limit.</p> * </note> * * <p>You can pass a session tag with the same key as a tag that is attached to the role. When * you do, the session tag overrides the role tag with the same key.</p> * <p>An administrator must grant you the permissions necessary to pass session tags. The * administrator can also create granular permissions to allow you to pass only specific * session tags. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html">Tutorial: Using Tags * for Attribute-Based Access Control</a> in the * <i>IAM User Guide</i>.</p> * <p>You can set the session tags as transitive. Transitive tags persist during role * chaining. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining">Chaining Roles * with Session Tags</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>Identities</b> * </p> * <p>Before your application can call <code>AssumeRoleWithWebIdentity</code>, you must have * an identity token from a supported identity provider and create a role that the application * can assume. The role that your application assumes must trust the identity provider that is * associated with the identity token. In other words, the identity provider must be specified * in the role's trust policy. </p> * <important> * <p>Calling <code>AssumeRoleWithWebIdentity</code> can result in an entry in your * CloudTrail logs. The entry includes the <a href="http://openid.net/specs/openid-connect-core-1_0.html#Claims">Subject</a> of * the provided web identity token. We recommend that you avoid using any personally * identifiable information (PII) in this field. For example, you could instead use a GUID * or a pairwise identifier, as <a href="http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes">suggested * in the OIDC specification</a>.</p> * </important> * <p>For more information about how to use web identity federation and the * <code>AssumeRoleWithWebIdentity</code> API, see the following resources: </p> * <ul> * <li> * <p> * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html">Using Web Identity Federation API Operations for Mobile Apps</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity">Federation Through a Web-based Identity Provider</a>. </p> * </li> * <li> * <p> * <a href="https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/"> Web Identity Federation Playground</a>. Walk through the process of * authenticating through Login with Amazon, Facebook, or Google, getting temporary * security credentials, and then using those credentials to make a request to Amazon Web Services. * </p> * </li> * <li> * <p> * <a href="http://aws.amazon.com/sdkforios/">Amazon Web Services SDK for iOS Developer Guide</a> and <a href="http://aws.amazon.com/sdkforandroid/">Amazon Web Services SDK for Android Developer Guide</a>. These toolkits * contain sample apps that show how to invoke the identity providers. The toolkits then * show how to use the information from these providers to get and use temporary * security credentials. </p> * </li> * <li> * <p> * <a href="http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications">Web Identity * Federation with Mobile Applications</a>. This article discusses web identity * federation and shows an example of how to use web identity federation to get access * to content in Amazon S3. </p> * </li> * </ul> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, AssumeRoleWithWebIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, AssumeRoleWithWebIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new AssumeRoleWithWebIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link AssumeRoleWithWebIdentityCommandInput} for command's `input` shape. * @see {@link AssumeRoleWithWebIdentityCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class AssumeRoleWithWebIdentityCommand extends $Command<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig> { readonly input: AssumeRoleWithWebIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: AssumeRoleWithWebIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput>; private serialize; private deserialize; } GetAccessKeyInfoCommand.d.ts 0000755 00000007460 15074313665 0012007 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { GetAccessKeyInfoRequest, GetAccessKeyInfoResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface GetAccessKeyInfoCommandInput extends GetAccessKeyInfoRequest { } export interface GetAccessKeyInfoCommandOutput extends GetAccessKeyInfoResponse, __MetadataBearer { } /** * <p>Returns the account identifier for the specified access key ID.</p> * <p>Access keys consist of two parts: an access key ID (for example, * <code>AKIAIOSFODNN7EXAMPLE</code>) and a secret access key (for example, * <code>wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY</code>). For more information about * access keys, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">Managing Access Keys for IAM * Users</a> in the <i>IAM User Guide</i>.</p> * <p>When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account * to which the keys belong. Access key IDs beginning with <code>AKIA</code> are long-term * credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with * <code>ASIA</code> are temporary credentials that are created using STS operations. If * the account in the response belongs to you, you can sign in as the root user and review * your root user access keys. Then, you can pull a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html">credentials report</a> to * learn which IAM user owns the keys. To learn who requested the temporary credentials for * an <code>ASIA</code> access key, view the STS events in your <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html">CloudTrail logs</a> in the * <i>IAM User Guide</i>.</p> * <p>This operation does not indicate the state of the access key. The key might be active, * inactive, or deleted. Active keys might not have permissions to perform an operation. * Providing a deleted access key might return an error that the key doesn't exist.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, GetAccessKeyInfoCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, GetAccessKeyInfoCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new GetAccessKeyInfoCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetAccessKeyInfoCommandInput} for command's `input` shape. * @see {@link GetAccessKeyInfoCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class GetAccessKeyInfoCommand extends $Command<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput, STSClientResolvedConfig> { readonly input: GetAccessKeyInfoCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetAccessKeyInfoCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput>; private serialize; private deserialize; } GetCallerIdentityCommand.d.ts 0000755 00000005472 15074313665 0012236 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { GetCallerIdentityRequest, GetCallerIdentityResponse } from "../models/models_0"; import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient"; export interface GetCallerIdentityCommandInput extends GetCallerIdentityRequest { } export interface GetCallerIdentityCommandOutput extends GetCallerIdentityResponse, __MetadataBearer { } /** * <p>Returns details about the IAM user or role whose credentials are used to call the * operation.</p> * <note> * <p>No permissions are required to perform this operation. If an administrator adds a * policy to your IAM user or role that explicitly denies access to the * <code>sts:GetCallerIdentity</code> action, you can still perform this operation. * Permissions are not required because the same information is returned when an IAM user * or role is denied access. To view an example response, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa">I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice</a> in the * <i>IAM User Guide</i>.</p> * </note> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts"; // ES Modules import * // const { STSClient, GetCallerIdentityCommand } = require("@aws-sdk/client-sts"); // CommonJS import * const client = new STSClient(config); * const command = new GetCallerIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetCallerIdentityCommandInput} for command's `input` shape. * @see {@link GetCallerIdentityCommandOutput} for command's `response` shape. * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape. * */ export declare class GetCallerIdentityCommand extends $Command<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput, STSClientResolvedConfig> { readonly input: GetCallerIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetCallerIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: STSClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput>; private serialize; private deserialize; } GetIdentityPoolRolesCommand.js 0000755 00000004705 15074321421 0012501 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetIdentityPoolRolesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetIdentityPoolRolesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetIdentityPoolRolesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetIdentityPoolRolesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetIdentityPoolRolesInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetIdentityPoolRolesResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetIdentityPoolRolesCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetIdentityPoolRolesCommand)(output, context); } } exports.GetIdentityPoolRolesCommand = GetIdentityPoolRolesCommand; GetPrincipalTagAttributeMapCommand.js 0000755 00000005013 15074321421 0013741 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetPrincipalTagAttributeMapCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetPrincipalTagAttributeMapCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetPrincipalTagAttributeMapCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetPrincipalTagAttributeMapCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetPrincipalTagAttributeMapInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetPrincipalTagAttributeMapResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetPrincipalTagAttributeMapCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetPrincipalTagAttributeMapCommand)(output, context); } } exports.GetPrincipalTagAttributeMapCommand = GetPrincipalTagAttributeMapCommand; TagResourceCommand.js 0000755 00000004553 15074321421 0010635 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TagResourceCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class TagResourceCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "TagResourceCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.TagResourceInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.TagResourceResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1TagResourceCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand)(output, context); } } exports.TagResourceCommand = TagResourceCommand; DescribeIdentityCommand.js 0000755 00000004630 15074321421 0011640 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DescribeIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class DescribeIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "DescribeIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.DescribeIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.IdentityDescriptionFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1DescribeIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1DescribeIdentityCommand)(output, context); } } exports.DescribeIdentityCommand = DescribeIdentityCommand; LookupDeveloperIdentityCommand.js 0000755 00000004743 15074321421 0013244 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LookupDeveloperIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class LookupDeveloperIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, LookupDeveloperIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "LookupDeveloperIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.LookupDeveloperIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.LookupDeveloperIdentityResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1LookupDeveloperIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1LookupDeveloperIdentityCommand)(output, context); } } exports.LookupDeveloperIdentityCommand = LookupDeveloperIdentityCommand; UnlinkDeveloperIdentityCommand.js 0000755 00000004671 15074321421 0013233 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnlinkDeveloperIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class UnlinkDeveloperIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UnlinkDeveloperIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "UnlinkDeveloperIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.UnlinkDeveloperIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: (output) => output, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1UnlinkDeveloperIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1UnlinkDeveloperIdentityCommand)(output, context); } } exports.UnlinkDeveloperIdentityCommand = UnlinkDeveloperIdentityCommand; SetIdentityPoolRolesCommand.js 0000755 00000004636 15074321421 0012520 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetIdentityPoolRolesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class SetIdentityPoolRolesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SetIdentityPoolRolesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "SetIdentityPoolRolesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.SetIdentityPoolRolesInputFilterSensitiveLog, outputFilterSensitiveLog: (output) => output, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1SetIdentityPoolRolesCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1SetIdentityPoolRolesCommand)(output, context); } } exports.SetIdentityPoolRolesCommand = SetIdentityPoolRolesCommand; GetOpenIdTokenCommand.js 0000755 00000004347 15074321421 0011232 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetOpenIdTokenCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetOpenIdTokenCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetOpenIdTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetOpenIdTokenCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetOpenIdTokenInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetOpenIdTokenResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetOpenIdTokenCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetOpenIdTokenCommand)(output, context); } } exports.GetOpenIdTokenCommand = GetOpenIdTokenCommand; UntagResourceCommand.js 0000755 00000004577 15074321421 0011206 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UntagResourceCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class UntagResourceCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "UntagResourceCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.UntagResourceInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.UntagResourceResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand)(output, context); } } exports.UntagResourceCommand = UntagResourceCommand; ListTagsForResourceCommand.js 0000755 00000004673 15074321421 0012326 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListTagsForResourceCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class ListTagsForResourceCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "ListTagsForResourceCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.ListTagsForResourceInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand)(output, context); } } exports.ListTagsForResourceCommand = ListTagsForResourceCommand; ListIdentityPoolsCommand.js 0000755 00000004647 15074321421 0012060 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListIdentityPoolsCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class ListIdentityPoolsCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListIdentityPoolsCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "ListIdentityPoolsCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.ListIdentityPoolsInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.ListIdentityPoolsResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1ListIdentityPoolsCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1ListIdentityPoolsCommand)(output, context); } } exports.ListIdentityPoolsCommand = ListIdentityPoolsCommand; DeleteIdentityPoolCommand.js 0000755 00000004614 15074321421 0012156 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteIdentityPoolCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class DeleteIdentityPoolCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteIdentityPoolCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "DeleteIdentityPoolCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.DeleteIdentityPoolInputFilterSensitiveLog, outputFilterSensitiveLog: (output) => output, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1DeleteIdentityPoolCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1DeleteIdentityPoolCommand)(output, context); } } exports.DeleteIdentityPoolCommand = DeleteIdentityPoolCommand; SetPrincipalTagAttributeMapCommand.js 0000755 00000005013 15074321421 0013755 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetPrincipalTagAttributeMapCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class SetPrincipalTagAttributeMapCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SetPrincipalTagAttributeMapCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "SetPrincipalTagAttributeMapCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.SetPrincipalTagAttributeMapInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.SetPrincipalTagAttributeMapResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1SetPrincipalTagAttributeMapCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1SetPrincipalTagAttributeMapCommand)(output, context); } } exports.SetPrincipalTagAttributeMapCommand = SetPrincipalTagAttributeMapCommand; MergeDeveloperIdentitiesCommand.js 0000755 00000004755 15074321421 0013345 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MergeDeveloperIdentitiesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class MergeDeveloperIdentitiesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, MergeDeveloperIdentitiesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "MergeDeveloperIdentitiesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.MergeDeveloperIdentitiesInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.MergeDeveloperIdentitiesResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1MergeDeveloperIdentitiesCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1MergeDeveloperIdentitiesCommand)(output, context); } } exports.MergeDeveloperIdentitiesCommand = MergeDeveloperIdentitiesCommand; UpdateIdentityPoolCommand.js 0000755 00000004630 15074321421 0012174 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateIdentityPoolCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class UpdateIdentityPoolCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateIdentityPoolCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "UpdateIdentityPoolCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.IdentityPoolFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.IdentityPoolFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1UpdateIdentityPoolCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1UpdateIdentityPoolCommand)(output, context); } } exports.UpdateIdentityPoolCommand = UpdateIdentityPoolCommand; DeleteIdentitiesCommand.js 0000755 00000004635 15074321421 0011637 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeleteIdentitiesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class DeleteIdentitiesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteIdentitiesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "DeleteIdentitiesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.DeleteIdentitiesInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.DeleteIdentitiesResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1DeleteIdentitiesCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1DeleteIdentitiesCommand)(output, context); } } exports.DeleteIdentitiesCommand = DeleteIdentitiesCommand; DescribeIdentityPoolCommand.js 0000755 00000004665 15074321421 0012502 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DescribeIdentityPoolCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class DescribeIdentityPoolCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeIdentityPoolCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "DescribeIdentityPoolCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.DescribeIdentityPoolInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.IdentityPoolFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1DescribeIdentityPoolCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1DescribeIdentityPoolCommand)(output, context); } } exports.DescribeIdentityPoolCommand = DescribeIdentityPoolCommand; GetCredentialsForIdentityCommand.js 0000755 00000004525 15074321421 0013467 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetCredentialsForIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetCredentialsForIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetCredentialsForIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetCredentialsForIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetCredentialsForIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetCredentialsForIdentityResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetCredentialsForIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetCredentialsForIdentityCommand)(output, context); } } exports.GetCredentialsForIdentityCommand = GetCredentialsForIdentityCommand; ListIdentitiesCommand.js 0000755 00000004611 15074321421 0011342 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListIdentitiesCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class ListIdentitiesCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListIdentitiesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "ListIdentitiesCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.ListIdentitiesInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.ListIdentitiesResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1ListIdentitiesCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1ListIdentitiesCommand)(output, context); } } exports.ListIdentitiesCommand = ListIdentitiesCommand; UnlinkIdentityCommand.js 0000755 00000004306 15074321421 0011360 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnlinkIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class UnlinkIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UnlinkIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "UnlinkIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.UnlinkIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: (output) => output, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1UnlinkIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1UnlinkIdentityCommand)(output, context); } } exports.UnlinkIdentityCommand = UnlinkIdentityCommand; CreateIdentityPoolCommand.js 0000755 00000004643 15074321421 0012161 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateIdentityPoolCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class CreateIdentityPoolCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateIdentityPoolCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "CreateIdentityPoolCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.CreateIdentityPoolInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.IdentityPoolFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1CreateIdentityPoolCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1CreateIdentityPoolCommand)(output, context); } } exports.CreateIdentityPoolCommand = CreateIdentityPoolCommand; GetOpenIdTokenForDeveloperIdentityCommand.js 0000755 00000005121 15074321421 0015250 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetOpenIdTokenForDeveloperIdentityCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const middleware_signing_1 = require("@aws-sdk/middleware-signing"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetOpenIdTokenForDeveloperIdentityCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetOpenIdTokenForDeveloperIdentityCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetOpenIdTokenForDeveloperIdentityCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityCommand)(output, context); } } exports.GetOpenIdTokenForDeveloperIdentityCommand = GetOpenIdTokenForDeveloperIdentityCommand; GetIdCommand.js 0000755 00000004215 15074321421 0007401 0 ustar 00 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetIdCommand = void 0; const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint"); const middleware_serde_1 = require("@aws-sdk/middleware-serde"); const smithy_client_1 = require("@aws-sdk/smithy-client"); const models_0_1 = require("../models/models_0"); const Aws_json1_1_1 = require("../protocols/Aws_json1_1"); class GetIdCommand extends smithy_client_1.Command { constructor(input) { super(); this.input = input; } static getEndpointParameterInstructions() { return { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, }; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetIdCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "CognitoIdentityClient"; const commandName = "GetIdCommand"; const handlerExecutionContext = { logger, clientName, commandName, inputFilterSensitiveLog: models_0_1.GetIdInputFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetIdResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { return (0, Aws_json1_1_1.serializeAws_json1_1GetIdCommand)(input, context); } deserialize(output, context) { return (0, Aws_json1_1_1.deserializeAws_json1_1GetIdCommand)(output, context); } } exports.GetIdCommand = GetIdCommand; DeleteIdentitiesCommand.d.ts 0000755 00000004436 15074326730 0012102 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { DeleteIdentitiesInput, DeleteIdentitiesResponse } from "../models/models_0"; export interface DeleteIdentitiesCommandInput extends DeleteIdentitiesInput { } export interface DeleteIdentitiesCommandOutput extends DeleteIdentitiesResponse, __MetadataBearer { } /** * <p>Deletes identities from an identity pool. You can specify a list of 1-60 identities * that you want to delete.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, DeleteIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, DeleteIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new DeleteIdentitiesCommand(input); * const response = await client.send(command); * ``` * * @see {@link DeleteIdentitiesCommandInput} for command's `input` shape. * @see {@link DeleteIdentitiesCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class DeleteIdentitiesCommand extends $Command<DeleteIdentitiesCommandInput, DeleteIdentitiesCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: DeleteIdentitiesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: DeleteIdentitiesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteIdentitiesCommandInput, DeleteIdentitiesCommandOutput>; private serialize; private deserialize; } UnlinkDeveloperIdentityCommand.d.ts 0000755 00000005076 15074326730 0013477 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { UnlinkDeveloperIdentityInput } from "../models/models_0"; export interface UnlinkDeveloperIdentityCommandInput extends UnlinkDeveloperIdentityInput { } export interface UnlinkDeveloperIdentityCommandOutput extends __MetadataBearer { } /** * <p>Unlinks a <code>DeveloperUserIdentifier</code> from an existing identity. Unlinked * developer users will be considered new identities next time they are seen. If, for a given * Cognito identity, you remove all federated identities as well as the developer user * identifier, the Cognito identity becomes inaccessible.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, UnlinkDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, UnlinkDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new UnlinkDeveloperIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link UnlinkDeveloperIdentityCommandInput} for command's `input` shape. * @see {@link UnlinkDeveloperIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class UnlinkDeveloperIdentityCommand extends $Command<UnlinkDeveloperIdentityCommandInput, UnlinkDeveloperIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: UnlinkDeveloperIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: UnlinkDeveloperIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UnlinkDeveloperIdentityCommandInput, UnlinkDeveloperIdentityCommandOutput>; private serialize; private deserialize; } UntagResourceCommand.d.ts 0000755 00000004271 15074326730 0011441 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { UntagResourceInput, UntagResourceResponse } from "../models/models_0"; export interface UntagResourceCommandInput extends UntagResourceInput { } export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer { } /** * <p>Removes the specified tags from the specified Amazon Cognito identity pool. You can use * this action up to 5 times per second, per account</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, UntagResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, UntagResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new UntagResourceCommand(input); * const response = await client.send(command); * ``` * * @see {@link UntagResourceCommandInput} for command's `input` shape. * @see {@link UntagResourceCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: UntagResourceCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: UntagResourceCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UntagResourceCommandInput, UntagResourceCommandOutput>; private serialize; private deserialize; } GetOpenIdTokenCommand.d.ts 0000755 00000004672 15074326730 0011477 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetOpenIdTokenInput, GetOpenIdTokenResponse } from "../models/models_0"; export interface GetOpenIdTokenCommandInput extends GetOpenIdTokenInput { } export interface GetOpenIdTokenCommandOutput extends GetOpenIdTokenResponse, __MetadataBearer { } /** * <p>Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by * <a>GetId</a>. You can optionally add additional logins for the identity. * Supplying multiple logins creates an implicit link.</p> * <p>The OpenID token is valid for 10 minutes.</p> * <p>This is a public API. You do not need any credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetOpenIdTokenCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetOpenIdTokenCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetOpenIdTokenCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetOpenIdTokenCommandInput} for command's `input` shape. * @see {@link GetOpenIdTokenCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetOpenIdTokenCommand extends $Command<GetOpenIdTokenCommandInput, GetOpenIdTokenCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetOpenIdTokenCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetOpenIdTokenCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetOpenIdTokenCommandInput, GetOpenIdTokenCommandOutput>; private serialize; private deserialize; } DeleteIdentityPoolCommand.d.ts 0000755 00000004405 15074326730 0012420 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { DeleteIdentityPoolInput } from "../models/models_0"; export interface DeleteIdentityPoolCommandInput extends DeleteIdentityPoolInput { } export interface DeleteIdentityPoolCommandOutput extends __MetadataBearer { } /** * <p>Deletes an identity pool. Once a pool is deleted, users will not be able to * authenticate with the pool.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, DeleteIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, DeleteIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new DeleteIdentityPoolCommand(input); * const response = await client.send(command); * ``` * * @see {@link DeleteIdentityPoolCommandInput} for command's `input` shape. * @see {@link DeleteIdentityPoolCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class DeleteIdentityPoolCommand extends $Command<DeleteIdentityPoolCommandInput, DeleteIdentityPoolCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: DeleteIdentityPoolCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: DeleteIdentityPoolCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteIdentityPoolCommandInput, DeleteIdentityPoolCommandOutput>; private serialize; private deserialize; } MergeDeveloperIdentitiesCommand.d.ts 0000755 00000006463 15074326730 0013607 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { MergeDeveloperIdentitiesInput, MergeDeveloperIdentitiesResponse } from "../models/models_0"; export interface MergeDeveloperIdentitiesCommandInput extends MergeDeveloperIdentitiesInput { } export interface MergeDeveloperIdentitiesCommandOutput extends MergeDeveloperIdentitiesResponse, __MetadataBearer { } /** * <p>Merges two users having different <code>IdentityId</code>s, existing in the same * identity pool, and identified by the same developer provider. You can use this action to * request that discrete users be merged and identified as a single user in the Cognito * environment. Cognito associates the given source user (<code>SourceUserIdentifier</code>) * with the <code>IdentityId</code> of the <code>DestinationUserIdentifier</code>. Only * developer-authenticated users can be merged. If the users to be merged are associated with * the same public provider, but as two different users, an exception will be * thrown.</p> * <p>The number of linked logins is limited to 20. So, the number of linked logins for the * source user, <code>SourceUserIdentifier</code>, and the destination user, * <code>DestinationUserIdentifier</code>, together should not be larger than 20. * Otherwise, an exception will be thrown.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, MergeDeveloperIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, MergeDeveloperIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new MergeDeveloperIdentitiesCommand(input); * const response = await client.send(command); * ``` * * @see {@link MergeDeveloperIdentitiesCommandInput} for command's `input` shape. * @see {@link MergeDeveloperIdentitiesCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class MergeDeveloperIdentitiesCommand extends $Command<MergeDeveloperIdentitiesCommandInput, MergeDeveloperIdentitiesCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: MergeDeveloperIdentitiesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: MergeDeveloperIdentitiesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<MergeDeveloperIdentitiesCommandInput, MergeDeveloperIdentitiesCommandOutput>; private serialize; private deserialize; } GetCredentialsForIdentityCommand.d.ts 0000755 00000005212 15074326730 0013725 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse } from "../models/models_0"; export interface GetCredentialsForIdentityCommandInput extends GetCredentialsForIdentityInput { } export interface GetCredentialsForIdentityCommandOutput extends GetCredentialsForIdentityResponse, __MetadataBearer { } /** * <p>Returns credentials for the provided identity ID. Any provided logins will be * validated against supported login providers. If the token is for * cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service * with the appropriate role for the token.</p> * <p>This is a public API. You do not need any credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetCredentialsForIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetCredentialsForIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetCredentialsForIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetCredentialsForIdentityCommandInput} for command's `input` shape. * @see {@link GetCredentialsForIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetCredentialsForIdentityCommand extends $Command<GetCredentialsForIdentityCommandInput, GetCredentialsForIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetCredentialsForIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetCredentialsForIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetCredentialsForIdentityCommandInput, GetCredentialsForIdentityCommandOutput>; private serialize; private deserialize; } TagResourceCommand.d.ts 0000755 00000006345 15074326730 0011102 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { TagResourceInput, TagResourceResponse } from "../models/models_0"; export interface TagResourceCommandInput extends TagResourceInput { } export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer { } /** * <p>Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label * that you can use to categorize and manage identity pools in different ways, such as by * purpose, owner, environment, or other criteria.</p> * <p>Each tag consists of a key and value, both of which you define. A key is a general * category for more specific values. For example, if you have two versions of an identity * pool, one for testing and another for production, you might assign an * <code>Environment</code> tag key to both identity pools. The value of this key might be * <code>Test</code> for one identity pool and <code>Production</code> for the * other.</p> * <p>Tags are useful for cost tracking and access control. You can activate your tags so that * they appear on the Billing and Cost Management console, where you can track the costs * associated with your identity pools. In an IAM policy, you can constrain permissions for * identity pools based on specific tags or tag values.</p> * <p>You can use this action up to 5 times per second, per account. An identity pool can have * as many as 50 tags.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, TagResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, TagResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new TagResourceCommand(input); * const response = await client.send(command); * ``` * * @see {@link TagResourceCommandInput} for command's `input` shape. * @see {@link TagResourceCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: TagResourceCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: TagResourceCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<TagResourceCommandInput, TagResourceCommandOutput>; private serialize; private deserialize; } SetPrincipalTagAttributeMapCommand.d.ts 0000755 00000004611 15074326730 0014224 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { SetPrincipalTagAttributeMapInput, SetPrincipalTagAttributeMapResponse } from "../models/models_0"; export interface SetPrincipalTagAttributeMapCommandInput extends SetPrincipalTagAttributeMapInput { } export interface SetPrincipalTagAttributeMapCommandOutput extends SetPrincipalTagAttributeMapResponse, __MetadataBearer { } /** * <p>You can use this operation to use default (username and clientID) attribute or custom attribute mappings.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, SetPrincipalTagAttributeMapCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, SetPrincipalTagAttributeMapCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new SetPrincipalTagAttributeMapCommand(input); * const response = await client.send(command); * ``` * * @see {@link SetPrincipalTagAttributeMapCommandInput} for command's `input` shape. * @see {@link SetPrincipalTagAttributeMapCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class SetPrincipalTagAttributeMapCommand extends $Command<SetPrincipalTagAttributeMapCommandInput, SetPrincipalTagAttributeMapCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: SetPrincipalTagAttributeMapCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: SetPrincipalTagAttributeMapCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<SetPrincipalTagAttributeMapCommandInput, SetPrincipalTagAttributeMapCommandOutput>; private serialize; private deserialize; } GetOpenIdTokenForDeveloperIdentityCommand.d.ts 0000755 00000007073 15074326730 0015524 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetOpenIdTokenForDeveloperIdentityInput, GetOpenIdTokenForDeveloperIdentityResponse } from "../models/models_0"; export interface GetOpenIdTokenForDeveloperIdentityCommandInput extends GetOpenIdTokenForDeveloperIdentityInput { } export interface GetOpenIdTokenForDeveloperIdentityCommandOutput extends GetOpenIdTokenForDeveloperIdentityResponse, __MetadataBearer { } /** * <p>Registers (or retrieves) a Cognito <code>IdentityId</code> and an OpenID Connect * token for a user authenticated by your backend authentication process. Supplying multiple * logins will create an implicit linked account. You can only specify one developer provider * as part of the <code>Logins</code> map, which is linked to the identity pool. The developer * provider is the "domain" by which Cognito will refer to your users.</p> * <p>You can use <code>GetOpenIdTokenForDeveloperIdentity</code> to create a new identity * and to link new logins (that is, user credentials issued by a public provider or developer * provider) to an existing identity. When you want to create a new identity, the * <code>IdentityId</code> should be null. When you want to associate a new login with an * existing authenticated/unauthenticated identity, you can do so by providing the existing * <code>IdentityId</code>. This API will create the identity in the specified * <code>IdentityPoolId</code>.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetOpenIdTokenForDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetOpenIdTokenForDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetOpenIdTokenForDeveloperIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetOpenIdTokenForDeveloperIdentityCommandInput} for command's `input` shape. * @see {@link GetOpenIdTokenForDeveloperIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetOpenIdTokenForDeveloperIdentityCommand extends $Command<GetOpenIdTokenForDeveloperIdentityCommandInput, GetOpenIdTokenForDeveloperIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetOpenIdTokenForDeveloperIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetOpenIdTokenForDeveloperIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetOpenIdTokenForDeveloperIdentityCommandInput, GetOpenIdTokenForDeveloperIdentityCommandOutput>; private serialize; private deserialize; } DescribeIdentityPoolCommand.d.ts 0000755 00000004535 15074326730 0012742 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { DescribeIdentityPoolInput, IdentityPool } from "../models/models_0"; export interface DescribeIdentityPoolCommandInput extends DescribeIdentityPoolInput { } export interface DescribeIdentityPoolCommandOutput extends IdentityPool, __MetadataBearer { } /** * <p>Gets details about a particular identity pool, including the pool name, ID * description, creation date, and current number of users.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, DescribeIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, DescribeIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new DescribeIdentityPoolCommand(input); * const response = await client.send(command); * ``` * * @see {@link DescribeIdentityPoolCommandInput} for command's `input` shape. * @see {@link DescribeIdentityPoolCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class DescribeIdentityPoolCommand extends $Command<DescribeIdentityPoolCommandInput, DescribeIdentityPoolCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: DescribeIdentityPoolCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: DescribeIdentityPoolCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeIdentityPoolCommandInput, DescribeIdentityPoolCommandOutput>; private serialize; private deserialize; } ListIdentitiesCommand.d.ts 0000755 00000004253 15074326730 0011610 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { ListIdentitiesInput, ListIdentitiesResponse } from "../models/models_0"; export interface ListIdentitiesCommandInput extends ListIdentitiesInput { } export interface ListIdentitiesCommandOutput extends ListIdentitiesResponse, __MetadataBearer { } /** * <p>Lists the identities in an identity pool.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, ListIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, ListIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new ListIdentitiesCommand(input); * const response = await client.send(command); * ``` * * @see {@link ListIdentitiesCommandInput} for command's `input` shape. * @see {@link ListIdentitiesCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class ListIdentitiesCommand extends $Command<ListIdentitiesCommandInput, ListIdentitiesCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: ListIdentitiesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: ListIdentitiesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListIdentitiesCommandInput, ListIdentitiesCommandOutput>; private serialize; private deserialize; } ListTagsForResourceCommand.d.ts 0000755 00000004750 15074326730 0012566 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { ListTagsForResourceInput, ListTagsForResourceResponse } from "../models/models_0"; export interface ListTagsForResourceCommandInput extends ListTagsForResourceInput { } export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer { } /** * <p>Lists the tags that are assigned to an Amazon Cognito identity pool.</p> * <p>A tag is a label that you can apply to identity pools to categorize and manage them in * different ways, such as by purpose, owner, environment, or other criteria.</p> * <p>You can use this action up to 10 times per second, per account.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, ListTagsForResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, ListTagsForResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new ListTagsForResourceCommand(input); * const response = await client.send(command); * ``` * * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class ListTagsForResourceCommand extends $Command<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: ListTagsForResourceCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: ListTagsForResourceCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput>; private serialize; private deserialize; } LookupDeveloperIdentityCommand.d.ts 0000755 00000007123 15074326730 0013503 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { LookupDeveloperIdentityInput, LookupDeveloperIdentityResponse } from "../models/models_0"; export interface LookupDeveloperIdentityCommandInput extends LookupDeveloperIdentityInput { } export interface LookupDeveloperIdentityCommandOutput extends LookupDeveloperIdentityResponse, __MetadataBearer { } /** * <p>Retrieves the <code>IdentityID</code> associated with a * <code>DeveloperUserIdentifier</code> or the list of <code>DeveloperUserIdentifier</code> * values associated with an <code>IdentityId</code> for an existing identity. Either * <code>IdentityID</code> or <code>DeveloperUserIdentifier</code> must not be null. If you * supply only one of these values, the other value will be searched in the database and * returned as a part of the response. If you supply both, * <code>DeveloperUserIdentifier</code> will be matched against <code>IdentityID</code>. If * the values are verified against the database, the response returns both values and is the * same as the request. Otherwise a <code>ResourceConflictException</code> is * thrown.</p> * <p> * <code>LookupDeveloperIdentity</code> is intended for low-throughput control plane * operations: for example, to enable customer service to locate an identity ID by username. * If you are using it for higher-volume operations such as user authentication, your requests * are likely to be throttled. <a>GetOpenIdTokenForDeveloperIdentity</a> is a * better option for higher-volume operations for user authentication.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, LookupDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, LookupDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new LookupDeveloperIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link LookupDeveloperIdentityCommandInput} for command's `input` shape. * @see {@link LookupDeveloperIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class LookupDeveloperIdentityCommand extends $Command<LookupDeveloperIdentityCommandInput, LookupDeveloperIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: LookupDeveloperIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: LookupDeveloperIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<LookupDeveloperIdentityCommandInput, LookupDeveloperIdentityCommandOutput>; private serialize; private deserialize; } DescribeIdentityCommand.d.ts 0000755 00000004441 15074326730 0012104 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { DescribeIdentityInput, IdentityDescription } from "../models/models_0"; export interface DescribeIdentityCommandInput extends DescribeIdentityInput { } export interface DescribeIdentityCommandOutput extends IdentityDescription, __MetadataBearer { } /** * <p>Returns metadata related to the given identity, including when the identity was * created and any associated linked logins.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, DescribeIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, DescribeIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new DescribeIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link DescribeIdentityCommandInput} for command's `input` shape. * @see {@link DescribeIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class DescribeIdentityCommand extends $Command<DescribeIdentityCommandInput, DescribeIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: DescribeIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: DescribeIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeIdentityCommandInput, DescribeIdentityCommandOutput>; private serialize; private deserialize; } CreateIdentityPoolCommand.d.ts 0000755 00000006013 15074326730 0012416 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { CreateIdentityPoolInput, IdentityPool } from "../models/models_0"; export interface CreateIdentityPoolCommandInput extends CreateIdentityPoolInput { } export interface CreateIdentityPoolCommandOutput extends IdentityPool, __MetadataBearer { } /** * <p>Creates a new identity pool. The identity pool is a store of user identity * information that is specific to your AWS account. The keys for <code>SupportedLoginProviders</code> are as follows:</p> * * <ul> * <li> * <p>Facebook: <code>graph.facebook.com</code> * </p> * </li> * <li> * <p>Google: <code>accounts.google.com</code> * </p> * </li> * <li> * <p>Amazon: <code>www.amazon.com</code> * </p> * </li> * <li> * <p>Twitter: <code>api.twitter.com</code> * </p> * </li> * <li> * <p>Digits: <code>www.digits.com</code> * </p> * </li> * </ul> * * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, CreateIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, CreateIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new CreateIdentityPoolCommand(input); * const response = await client.send(command); * ``` * * @see {@link CreateIdentityPoolCommandInput} for command's `input` shape. * @see {@link CreateIdentityPoolCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class CreateIdentityPoolCommand extends $Command<CreateIdentityPoolCommandInput, CreateIdentityPoolCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: CreateIdentityPoolCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: CreateIdentityPoolCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateIdentityPoolCommandInput, CreateIdentityPoolCommandOutput>; private serialize; private deserialize; } UpdateIdentityPoolCommand.d.ts 0000755 00000004243 15074326730 0012440 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { IdentityPool } from "../models/models_0"; export interface UpdateIdentityPoolCommandInput extends IdentityPool { } export interface UpdateIdentityPoolCommandOutput extends IdentityPool, __MetadataBearer { } /** * <p>Updates an identity pool.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, UpdateIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, UpdateIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new UpdateIdentityPoolCommand(input); * const response = await client.send(command); * ``` * * @see {@link UpdateIdentityPoolCommandInput} for command's `input` shape. * @see {@link UpdateIdentityPoolCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class UpdateIdentityPoolCommand extends $Command<UpdateIdentityPoolCommandInput, UpdateIdentityPoolCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: UpdateIdentityPoolCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: UpdateIdentityPoolCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UpdateIdentityPoolCommandInput, UpdateIdentityPoolCommandOutput>; private serialize; private deserialize; } SetIdentityPoolRolesCommand.d.ts 0000755 00000004451 15074326730 0012757 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { SetIdentityPoolRolesInput } from "../models/models_0"; export interface SetIdentityPoolRolesCommandInput extends SetIdentityPoolRolesInput { } export interface SetIdentityPoolRolesCommandOutput extends __MetadataBearer { } /** * <p>Sets the roles for an identity pool. These roles are used when making calls to <a>GetCredentialsForIdentity</a> action.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, SetIdentityPoolRolesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, SetIdentityPoolRolesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new SetIdentityPoolRolesCommand(input); * const response = await client.send(command); * ``` * * @see {@link SetIdentityPoolRolesCommandInput} for command's `input` shape. * @see {@link SetIdentityPoolRolesCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class SetIdentityPoolRolesCommand extends $Command<SetIdentityPoolRolesCommandInput, SetIdentityPoolRolesCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: SetIdentityPoolRolesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: SetIdentityPoolRolesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<SetIdentityPoolRolesCommandInput, SetIdentityPoolRolesCommandOutput>; private serialize; private deserialize; } UnlinkIdentityCommand.d.ts 0000755 00000004477 15074326730 0011635 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { UnlinkIdentityInput } from "../models/models_0"; export interface UnlinkIdentityCommandInput extends UnlinkIdentityInput { } export interface UnlinkIdentityCommandOutput extends __MetadataBearer { } /** * <p>Unlinks a federated identity from an existing account. Unlinked logins will be * considered new identities next time they are seen. Removing the last linked login will make * this identity inaccessible.</p> * <p>This is a public API. You do not need any credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, UnlinkIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, UnlinkIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new UnlinkIdentityCommand(input); * const response = await client.send(command); * ``` * * @see {@link UnlinkIdentityCommandInput} for command's `input` shape. * @see {@link UnlinkIdentityCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class UnlinkIdentityCommand extends $Command<UnlinkIdentityCommandInput, UnlinkIdentityCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: UnlinkIdentityCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: UnlinkIdentityCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UnlinkIdentityCommandInput, UnlinkIdentityCommandOutput>; private serialize; private deserialize; } GetIdCommand.d.ts 0000755 00000004143 15074326730 0007645 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetIdInput, GetIdResponse } from "../models/models_0"; export interface GetIdCommandInput extends GetIdInput { } export interface GetIdCommandOutput extends GetIdResponse, __MetadataBearer { } /** * <p>Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an * implicit linked account.</p> * <p>This is a public API. You do not need any credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetIdCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetIdCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetIdCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetIdCommandInput} for command's `input` shape. * @see {@link GetIdCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetIdCommand extends $Command<GetIdCommandInput, GetIdCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetIdCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetIdCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetIdCommandInput, GetIdCommandOutput>; private serialize; private deserialize; } GetPrincipalTagAttributeMapCommand.d.ts 0000755 00000004631 15074326730 0014212 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetPrincipalTagAttributeMapInput, GetPrincipalTagAttributeMapResponse } from "../models/models_0"; export interface GetPrincipalTagAttributeMapCommandInput extends GetPrincipalTagAttributeMapInput { } export interface GetPrincipalTagAttributeMapCommandOutput extends GetPrincipalTagAttributeMapResponse, __MetadataBearer { } /** * <p>Use <code>GetPrincipalTagAttributeMap</code> to list all mappings between <code>PrincipalTags</code> and user attributes.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetPrincipalTagAttributeMapCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetPrincipalTagAttributeMapCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetPrincipalTagAttributeMapCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetPrincipalTagAttributeMapCommandInput} for command's `input` shape. * @see {@link GetPrincipalTagAttributeMapCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetPrincipalTagAttributeMapCommand extends $Command<GetPrincipalTagAttributeMapCommandInput, GetPrincipalTagAttributeMapCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetPrincipalTagAttributeMapCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetPrincipalTagAttributeMapCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetPrincipalTagAttributeMapCommandInput, GetPrincipalTagAttributeMapCommandOutput>; private serialize; private deserialize; } ListIdentityPoolsCommand.d.ts 0000755 00000004374 15074326730 0012321 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { ListIdentityPoolsInput, ListIdentityPoolsResponse } from "../models/models_0"; export interface ListIdentityPoolsCommandInput extends ListIdentityPoolsInput { } export interface ListIdentityPoolsCommandOutput extends ListIdentityPoolsResponse, __MetadataBearer { } /** * <p>Lists all of the Cognito identity pools registered for your account.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, ListIdentityPoolsCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, ListIdentityPoolsCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new ListIdentityPoolsCommand(input); * const response = await client.send(command); * ``` * * @see {@link ListIdentityPoolsCommandInput} for command's `input` shape. * @see {@link ListIdentityPoolsCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class ListIdentityPoolsCommand extends $Command<ListIdentityPoolsCommandInput, ListIdentityPoolsCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: ListIdentityPoolsCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: ListIdentityPoolsCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListIdentityPoolsCommandInput, ListIdentityPoolsCommandOutput>; private serialize; private deserialize; } GetIdentityPoolRolesCommand.d.ts 0000755 00000004422 15074326730 0012741 0 ustar 00 import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { CognitoIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityClient"; import { GetIdentityPoolRolesInput, GetIdentityPoolRolesResponse } from "../models/models_0"; export interface GetIdentityPoolRolesCommandInput extends GetIdentityPoolRolesInput { } export interface GetIdentityPoolRolesCommandOutput extends GetIdentityPoolRolesResponse, __MetadataBearer { } /** * <p>Gets the roles for an identity pool.</p> * <p>You must use AWS Developer credentials to call this API.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityClient, GetIdentityPoolRolesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import * // const { CognitoIdentityClient, GetIdentityPoolRolesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import * const client = new CognitoIdentityClient(config); * const command = new GetIdentityPoolRolesCommand(input); * const response = await client.send(command); * ``` * * @see {@link GetIdentityPoolRolesCommandInput} for command's `input` shape. * @see {@link GetIdentityPoolRolesCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. * */ export declare class GetIdentityPoolRolesCommand extends $Command<GetIdentityPoolRolesCommandInput, GetIdentityPoolRolesCommandOutput, CognitoIdentityClientResolvedConfig> { readonly input: GetIdentityPoolRolesCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; constructor(input: GetIdentityPoolRolesCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CognitoIdentityClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetIdentityPoolRolesCommandInput, GetIdentityPoolRolesCommandOutput>; private serialize; private deserialize; } prepare.js 0000755 00000006650 15074741520 0006557 0 ustar 00 'use strict'; const Packets = require('../packets/index.js'); const Command = require('./command.js'); const CloseStatement = require('./close_statement.js'); const Execute = require('./execute.js'); class PreparedStatementInfo { constructor(query, id, columns, parameters, connection) { this.query = query; this.id = id; this.columns = columns; this.parameters = parameters; this.rowParser = null; this._connection = connection; } close() { return this._connection.addCommand(new CloseStatement(this.id)); } execute(parameters, callback) { if (typeof parameters === 'function') { callback = parameters; parameters = []; } return this._connection.addCommand( new Execute({ statement: this, values: parameters }, callback) ); } } class Prepare extends Command { constructor(options, callback) { super(); this.query = options.sql; this.onResult = callback; this.id = 0; this.fieldCount = 0; this.parameterCount = 0; this.fields = []; this.parameterDefinitions = []; this.options = options; } start(packet, connection) { const Connection = connection.constructor; this.key = Connection.statementKey(this.options); const statement = connection._statements.get(this.key); if (statement) { if (this.onResult) { this.onResult(null, statement); } return null; } const cmdPacket = new Packets.PrepareStatement( this.query, connection.config.charsetNumber ); connection.writePacket(cmdPacket.toPacket(1)); return Prepare.prototype.prepareHeader; } prepareHeader(packet, connection) { const header = new Packets.PreparedStatementHeader(packet); this.id = header.id; this.fieldCount = header.fieldCount; this.parameterCount = header.parameterCount; if (this.parameterCount > 0) { return Prepare.prototype.readParameter; } if (this.fieldCount > 0) { return Prepare.prototype.readField; } return this.prepareDone(connection); } readParameter(packet, connection) { const def = new Packets.ColumnDefinition(packet, connection.clientEncoding); this.parameterDefinitions.push(def); if (this.parameterDefinitions.length === this.parameterCount) { return Prepare.prototype.parametersEOF; } return this.readParameter; } readField(packet, connection) { const def = new Packets.ColumnDefinition(packet, connection.clientEncoding); this.fields.push(def); if (this.fields.length === this.fieldCount) { return Prepare.prototype.fieldsEOF; } return Prepare.prototype.readField; } parametersEOF(packet, connection) { if (!packet.isEOF()) { return connection.protocolError('Expected EOF packet after parameters'); } if (this.fieldCount > 0) { return Prepare.prototype.readField; } return this.prepareDone(connection); } fieldsEOF(packet, connection) { if (!packet.isEOF()) { return connection.protocolError('Expected EOF packet after fields'); } return this.prepareDone(connection); } prepareDone(connection) { const statement = new PreparedStatementInfo( this.query, this.id, this.fields, this.parameterDefinitions, connection ); connection._statements.set(this.key, statement); if (this.onResult) { this.onResult(null, statement); } return null; } } module.exports = Prepare; execute.js 0000755 00000007205 15074741520 0006560 0 ustar 00 'use strict'; const Command = require('./command.js'); const Query = require('./query.js'); const Packets = require('../packets/index.js'); const getBinaryParser = require('../parsers/binary_parser.js'); class Execute extends Command { constructor(options, callback) { super(); this.statement = options.statement; this.sql = options.sql; this.values = options.values; this.onResult = callback; this.parameters = options.values; this.insertId = 0; this.timeout = options.timeout; this.queryTimeout = null; this._rows = []; this._fields = []; this._result = []; this._fieldCount = 0; this._rowParser = null; this._executeOptions = options; this._resultIndex = 0; this._localStream = null; this._unpipeStream = function() {}; this._streamFactory = options.infileStreamFactory; this._connection = null; } buildParserFromFields(fields, connection) { return getBinaryParser(fields, this.options, connection.config); } start(packet, connection) { this._connection = connection; this.options = Object.assign({}, connection.config, this._executeOptions); this._setTimeout(); const executePacket = new Packets.Execute( this.statement.id, this.parameters, connection.config.charsetNumber, connection.config.timezone ); //For reasons why this try-catch is here, please see // https://github.com/sidorares/node-mysql2/pull/689 //For additional discussion, see // 1. https://github.com/sidorares/node-mysql2/issues/493 // 2. https://github.com/sidorares/node-mysql2/issues/187 // 3. https://github.com/sidorares/node-mysql2/issues/480 try { connection.writePacket(executePacket.toPacket(1)); } catch (error) { this.onResult(error); } return Execute.prototype.resultsetHeader; } readField(packet, connection) { let fields; // disabling for now, but would be great to find reliable way to parse fields only once // fields reported by prepare can be empty at all or just incorrect - see #169 // // perfomance optimisation: if we already have this field parsed in statement header, use one from header // const field = this.statement.columns.length == this._fieldCount ? // this.statement.columns[this._receivedFieldsCount] : new Packets.ColumnDefinition(packet); const field = new Packets.ColumnDefinition( packet, connection.clientEncoding ); this._receivedFieldsCount++; this._fields[this._resultIndex].push(field); if (this._receivedFieldsCount === this._fieldCount) { fields = this._fields[this._resultIndex]; this.emit('fields', fields, this._resultIndex); return Execute.prototype.fieldsEOF; } return Execute.prototype.readField; } fieldsEOF(packet, connection) { // check EOF if (!packet.isEOF()) { return connection.protocolError('Expected EOF packet'); } this._rowParser = new (this.buildParserFromFields( this._fields[this._resultIndex], connection ))(); return Execute.prototype.row; } } Execute.prototype.done = Query.prototype.done; Execute.prototype.doneInsert = Query.prototype.doneInsert; Execute.prototype.resultsetHeader = Query.prototype.resultsetHeader; Execute.prototype._findOrCreateReadStream = Query.prototype._findOrCreateReadStream; Execute.prototype._streamLocalInfile = Query.prototype._streamLocalInfile; Execute.prototype._setTimeout = Query.prototype._setTimeout; Execute.prototype._handleTimeoutError = Query.prototype._handleTimeoutError; Execute.prototype.row = Query.prototype.row; Execute.prototype.stream = Query.prototype.stream; module.exports = Execute; client_handshake.js 0000755 00000014453 15074741520 0010405 0 ustar 00 // This file was modified by Oracle on June 17, 2021. // Handshake errors are now maked as fatal and the corresponding events are // emitted in the command instance itself. // Modifications copyright (c) 2021, Oracle and/or its affiliates. 'use strict'; const Command = require('./command.js'); const Packets = require('../packets/index.js'); const ClientConstants = require('../constants/client.js'); const CharsetToEncoding = require('../constants/charset_encodings.js'); const auth41 = require('../auth_41.js'); function flagNames(flags) { const res = []; for (const c in ClientConstants) { if (flags & ClientConstants[c]) { res.push(c.replace(/_/g, ' ').toLowerCase()); } } return res; } class ClientHandshake extends Command { constructor(clientFlags) { super(); this.handshake = null; this.clientFlags = clientFlags; } start() { return ClientHandshake.prototype.handshakeInit; } sendSSLRequest(connection) { const sslRequest = new Packets.SSLRequest( this.clientFlags, connection.config.charsetNumber ); connection.writePacket(sslRequest.toPacket()); } sendCredentials(connection) { if (connection.config.debug) { // eslint-disable-next-line console.log( 'Sending handshake packet: flags:%d=(%s)', this.clientFlags, flagNames(this.clientFlags).join(', ') ); } this.user = connection.config.user; this.password = connection.config.password; this.passwordSha1 = connection.config.passwordSha1; this.database = connection.config.database; this.autPluginName = this.handshake.autPluginName; const handshakeResponse = new Packets.HandshakeResponse({ flags: this.clientFlags, user: this.user, database: this.database, password: this.password, passwordSha1: this.passwordSha1, charsetNumber: connection.config.charsetNumber, authPluginData1: this.handshake.authPluginData1, authPluginData2: this.handshake.authPluginData2, compress: connection.config.compress, connectAttributes: connection.config.connectAttributes }); connection.writePacket(handshakeResponse.toPacket()); } calculateNativePasswordAuthToken(authPluginData) { // TODO: dont split into authPluginData1 and authPluginData2, instead join when 1 & 2 received const authPluginData1 = authPluginData.slice(0, 8); const authPluginData2 = authPluginData.slice(8, 20); let authToken; if (this.passwordSha1) { authToken = auth41.calculateTokenFromPasswordSha( this.passwordSha1, authPluginData1, authPluginData2 ); } else { authToken = auth41.calculateToken( this.password, authPluginData1, authPluginData2 ); } return authToken; } handshakeInit(helloPacket, connection) { this.on('error', e => { connection._fatalError = e; connection._protocolError = e; }); this.handshake = Packets.Handshake.fromPacket(helloPacket); if (connection.config.debug) { // eslint-disable-next-line console.log( 'Server hello packet: capability flags:%d=(%s)', this.handshake.capabilityFlags, flagNames(this.handshake.capabilityFlags).join(', ') ); } connection.serverCapabilityFlags = this.handshake.capabilityFlags; connection.serverEncoding = CharsetToEncoding[this.handshake.characterSet]; connection.connectionId = this.handshake.connectionId; const serverSSLSupport = this.handshake.capabilityFlags & ClientConstants.SSL; // use compression only if requested by client and supported by server connection.config.compress = connection.config.compress && this.handshake.capabilityFlags & ClientConstants.COMPRESS; this.clientFlags = this.clientFlags | connection.config.compress; if (connection.config.ssl) { // client requires SSL but server does not support it if (!serverSSLSupport) { const err = new Error('Server does not support secure connnection'); err.code = 'HANDSHAKE_NO_SSL_SUPPORT'; err.fatal = true; this.emit('error', err); return false; } // send ssl upgrade request and immediately upgrade connection to secure this.clientFlags |= ClientConstants.SSL; this.sendSSLRequest(connection); connection.startTLS(err => { // after connection is secure if (err) { // SSL negotiation error are fatal err.code = 'HANDSHAKE_SSL_ERROR'; err.fatal = true; this.emit('error', err); return; } // rest of communication is encrypted this.sendCredentials(connection); }); } else { this.sendCredentials(connection); } return ClientHandshake.prototype.handshakeResult; } handshakeResult(packet, connection) { const marker = packet.peekByte(); if (marker === 0xfe || marker === 1) { const authSwitch = require('./auth_switch'); try { if (marker === 1) { authSwitch.authSwitchRequestMoreData(packet, connection, this); } else { authSwitch.authSwitchRequest(packet, connection, this); } return ClientHandshake.prototype.handshakeResult; } catch (err) { // Authentication errors are fatal err.code = 'AUTH_SWITCH_PLUGIN_ERROR'; err.fatal = true; if (this.onResult) { this.onResult(err); } else { this.emit('error', err); } return null; } } if (marker !== 0) { const err = new Error('Unexpected packet during handshake phase'); // Unknown handshake errors are fatal err.code = 'HANDSHAKE_UNKNOWN_ERROR'; err.fatal = true; if (this.onResult) { this.onResult(err); } else { this.emit('error', err); } return null; } // this should be called from ClientHandshake command only // and skipped when called from ChangeUser command if (!connection.authorized) { connection.authorized = true; if (connection.config.compress) { const enableCompression = require('../compressed_protocol.js') .enableCompression; enableCompression(connection); } } if (this.onResult) { this.onResult(null); } return null; } } module.exports = ClientHandshake; quit.js 0000755 00000001063 15074741520 0006074 0 ustar 00 'use strict'; const Command = require('./command.js'); const CommandCode = require('../constants/commands.js'); const Packet = require('../packets/packet.js'); class Quit extends Command { constructor(callback) { super(); this.done = callback; } start(packet, connection) { connection._closing = true; const quit = new Packet( 0, Buffer.from([1, 0, 0, 0, CommandCode.QUIT]), 0, 5 ); if (this.done) { this.done(); } connection.writePacket(quit); return null; } } module.exports = Quit; ping.js 0000755 00000001461 15074741520 0006051 0 ustar 00 'use strict'; const Command = require('./command'); const CommandCode = require('../constants/commands'); const Packet = require('../packets/packet'); // TODO: time statistics? // usefull for queue size and network latency monitoring // store created,sent,reply timestamps class Ping extends Command { constructor(callback) { super(); this.onResult = callback; } start(packet, connection) { const ping = new Packet( 0, Buffer.from([1, 0, 0, 0, CommandCode.PING]), 0, 5 ); connection.writePacket(ping); return Ping.prototype.pingResponse; } pingResponse() { // TODO: check it's OK packet. error check already done in caller if (this.onResult) { process.nextTick(this.onResult.bind(this)); } return null; } } module.exports = Ping; auth_switch.js 0000755 00000006603 15074741520 0007441 0 ustar 00 // This file was modified by Oracle on July 5, 2021. // Errors generated by asynchronous authentication plugins are now being // handled and subsequently emitted at the command level. // Modifications copyright (c) 2021, Oracle and/or its affiliates. 'use strict'; const Packets = require('../packets/index.js'); const sha256_password = require('../auth_plugins/sha256_password'); const caching_sha2_password = require('../auth_plugins/caching_sha2_password.js'); const mysql_native_password = require('../auth_plugins/mysql_native_password.js'); const standardAuthPlugins = { sha256_password: sha256_password({}), caching_sha2_password: caching_sha2_password({}), mysql_native_password: mysql_native_password({}) }; function warnLegacyAuthSwitch() { console.warn( 'WARNING! authSwitchHandler api is deprecated, please use new authPlugins api' ); } function authSwitchPluginError(error, command) { // Authentication errors are fatal error.code = 'AUTH_SWITCH_PLUGIN_ERROR'; error.fatal = true; command.emit('error', error); } function authSwitchRequest(packet, connection, command) { const { pluginName, pluginData } = Packets.AuthSwitchRequest.fromPacket( packet ); let authPlugin = connection.config.authPlugins && connection.config.authPlugins[pluginName]; // legacy plugin api don't allow to override mysql_native_password // if pluginName is mysql_native_password it's using standard auth4.1 auth if ( connection.config.authSwitchHandler && pluginName !== 'mysql_native_password' ) { const legacySwitchHandler = connection.config.authSwitchHandler; warnLegacyAuthSwitch(); legacySwitchHandler({ pluginName, pluginData }, (err, data) => { if (err) { return authSwitchPluginError(err, command); } connection.writePacket(new Packets.AuthSwitchResponse(data).toPacket()); }); return; } if (!authPlugin) { authPlugin = standardAuthPlugins[pluginName]; } if (!authPlugin) { throw new Error( `Server requests authentication using unknown plugin ${pluginName}. See ${'TODO: add plugins doco here'} on how to configure or author authentication plugins.` ); } connection._authPlugin = authPlugin({ connection, command }); Promise.resolve(connection._authPlugin(pluginData)).then(data => { if (data) { connection.writePacket(new Packets.AuthSwitchResponse(data).toPacket()); } }).catch(err => { authSwitchPluginError(err, command); }); } function authSwitchRequestMoreData(packet, connection, command) { const { data } = Packets.AuthSwitchRequestMoreData.fromPacket(packet); if (connection.config.authSwitchHandler) { const legacySwitchHandler = connection.config.authSwitchHandler; warnLegacyAuthSwitch(); legacySwitchHandler({ pluginData: data }, (err, data) => { if (err) { return authSwitchPluginError(err, command); } connection.writePacket(new Packets.AuthSwitchResponse(data).toPacket()); }); return; } if (!connection._authPlugin) { throw new Error( 'AuthPluginMoreData received but no auth plugin instance found' ); } Promise.resolve(connection._authPlugin(data)).then(data => { if (data) { connection.writePacket(new Packets.AuthSwitchResponse(data).toPacket()); } }).catch(err => { authSwitchPluginError(err, command); }); } module.exports = { authSwitchRequest, authSwitchRequestMoreData }; register_slave.js 0000755 00000001120 15074741520 0010122 0 ustar 00 'use strict'; const Command = require('./command'); const Packets = require('../packets'); class RegisterSlave extends Command { constructor(opts, callback) { super(); this.onResult = callback; this.opts = opts; } start(packet, connection) { const newPacket = new Packets.RegisterSlave(this.opts); connection.writePacket(newPacket.toPacket(1)); return RegisterSlave.prototype.registerResponse; } registerResponse() { if (this.onResult) { process.nextTick(this.onResult.bind(this)); } return null; } } module.exports = RegisterSlave; command.js 0000755 00000002360 15074741520 0006531 0 ustar 00 'use strict'; const EventEmitter = require('events').EventEmitter; const Timers = require('timers'); class Command extends EventEmitter { constructor() { super(); this.next = null; } // slow. debug only stateName() { const state = this.next; for (const i in this) { if (this[i] === state && i !== 'next') { return i; } } return 'unknown name'; } execute(packet, connection) { if (!this.next) { this.next = this.start; connection._resetSequenceId(); } if (packet && packet.isError()) { const err = packet.asError(connection.clientEncoding); err.sql = this.sql || this.query; if (this.queryTimeout) { Timers.clearTimeout(this.queryTimeout); this.queryTimeout = null; } if (this.onResult) { this.onResult(err); this.emit('end'); } else { this.emit('error', err); this.emit('end'); } return true; } // TODO: don't return anything from execute, it's ugly and error-prone. Listen for 'end' event in connection this.next = this.next(packet, connection); if (this.next) { return false; } this.emit('end'); return true; } } module.exports = Command; binlog_dump.js 0000755 00000005550 15074741520 0007416 0 ustar 00 'use strict'; const Command = require('./command'); const Packets = require('../packets'); const eventParsers = []; class BinlogEventHeader { constructor(packet) { this.timestamp = packet.readInt32(); this.eventType = packet.readInt8(); this.serverId = packet.readInt32(); this.eventSize = packet.readInt32(); this.logPos = packet.readInt32(); this.flags = packet.readInt16(); } } class BinlogDump extends Command { constructor(opts) { super(); // this.onResult = callback; this.opts = opts; } start(packet, connection) { const newPacket = new Packets.BinlogDump(this.opts); connection.writePacket(newPacket.toPacket(1)); return BinlogDump.prototype.binlogData; } binlogData(packet) { // ok - continue consuming events // error - error // eof - end of binlog if (packet.isEOF()) { this.emit('eof'); return null; } // binlog event header packet.readInt8(); const header = new BinlogEventHeader(packet); const EventParser = eventParsers[header.eventType]; let event; if (EventParser) { event = new EventParser(packet); } else { event = { name: 'UNKNOWN' }; } event.header = header; this.emit('event', event); return BinlogDump.prototype.binlogData; } } class RotateEvent { constructor(packet) { this.pposition = packet.readInt32(); // TODO: read uint64 here packet.readInt32(); // positionDword2 this.nextBinlog = packet.readString(); this.name = 'RotateEvent'; } } class FormatDescriptionEvent { constructor(packet) { this.binlogVersion = packet.readInt16(); this.serverVersion = packet.readString(50).replace(/\u0000.*/, ''); // eslint-disable-line no-control-regex this.createTimestamp = packet.readInt32(); this.eventHeaderLength = packet.readInt8(); // should be 19 this.eventsLength = packet.readBuffer(); this.name = 'FormatDescriptionEvent'; } } class QueryEvent { constructor(packet) { const parseStatusVars = require('../packets/binlog_query_statusvars.js'); this.slaveProxyId = packet.readInt32(); this.executionTime = packet.readInt32(); const schemaLength = packet.readInt8(); this.errorCode = packet.readInt16(); const statusVarsLength = packet.readInt16(); const statusVars = packet.readBuffer(statusVarsLength); this.schema = packet.readString(schemaLength); packet.readInt8(); // should be zero this.statusVars = parseStatusVars(statusVars); this.query = packet.readString(); this.name = 'QueryEvent'; } } class XidEvent { constructor(packet) { this.binlogVersion = packet.readInt16(); this.xid = packet.readInt64(); this.name = 'XidEvent'; } } eventParsers[2] = QueryEvent; eventParsers[4] = RotateEvent; eventParsers[15] = FormatDescriptionEvent; eventParsers[16] = XidEvent; module.exports = BinlogDump; query.js 0000755 00000023532 15074741520 0006264 0 ustar 00 'use strict'; const process = require('process'); const Timers = require('timers'); const Readable = require('stream').Readable; const Command = require('./command.js'); const Packets = require('../packets/index.js'); const getTextParser = require('../parsers/text_parser.js'); const ServerStatus = require('../constants/server_status.js'); const EmptyPacket = new Packets.Packet(0, Buffer.allocUnsafe(4), 0, 4); // http://dev.mysql.com/doc/internals/en/com-query.html class Query extends Command { constructor(options, callback) { super(); this.sql = options.sql; this.values = options.values; this._queryOptions = options; this.namedPlaceholders = options.namedPlaceholders || false; this.onResult = callback; this.timeout = options.timeout; this.queryTimeout = null; this._fieldCount = 0; this._rowParser = null; this._fields = []; this._rows = []; this._receivedFieldsCount = 0; this._resultIndex = 0; this._localStream = null; this._unpipeStream = function() {}; this._streamFactory = options.infileStreamFactory; this._connection = null; } then() { const err = "You have tried to call .then(), .catch(), or invoked await on the result of query that is not a promise, which is a programming error. Try calling con.promise().query(), or require('mysql2/promise') instead of 'mysql2' for a promise-compatible version of the query interface. To learn how to use async/await or Promises check out documentation at https://www.npmjs.com/package/mysql2#using-promise-wrapper, or the mysql2 documentation at https://github.com/sidorares/node-mysql2/tree/master/documentation/Promise-Wrapper.md"; // eslint-disable-next-line console.log(err); throw new Error(err); } /* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ start(_packet, connection) { if (connection.config.debug) { // eslint-disable-next-line console.log(' Sending query command: %s', this.sql); } this._connection = connection; this.options = Object.assign({}, connection.config, this._queryOptions); this._setTimeout(); const cmdPacket = new Packets.Query( this.sql, connection.config.charsetNumber ); connection.writePacket(cmdPacket.toPacket(1)); return Query.prototype.resultsetHeader; } done() { this._unpipeStream(); // if all ready timeout, return null directly if (this.timeout && !this.queryTimeout) { return null; } // else clear timer if (this.queryTimeout) { Timers.clearTimeout(this.queryTimeout); this.queryTimeout = null; } if (this.onResult) { let rows, fields; if (this._resultIndex === 0) { rows = this._rows[0]; fields = this._fields[0]; } else { rows = this._rows; fields = this._fields; } if (fields) { process.nextTick(() => { this.onResult(null, rows, fields); }); } else { process.nextTick(() => { this.onResult(null, rows); }); } } return null; } doneInsert(rs) { if (this._localStreamError) { if (this.onResult) { this.onResult(this._localStreamError, rs); } else { this.emit('error', this._localStreamError); } return null; } this._rows.push(rs); this._fields.push(void 0); this.emit('fields', void 0); this.emit('result', rs); if (rs.serverStatus & ServerStatus.SERVER_MORE_RESULTS_EXISTS) { this._resultIndex++; return this.resultsetHeader; } return this.done(); } resultsetHeader(packet, connection) { const rs = new Packets.ResultSetHeader(packet, connection); this._fieldCount = rs.fieldCount; if (connection.config.debug) { // eslint-disable-next-line console.log( ` Resultset header received, expecting ${rs.fieldCount} column definition packets` ); } if (this._fieldCount === 0) { return this.doneInsert(rs); } if (this._fieldCount === null) { return this._streamLocalInfile(connection, rs.infileName); } this._receivedFieldsCount = 0; this._rows.push([]); this._fields.push([]); return this.readField; } _streamLocalInfile(connection, path) { if (this._streamFactory) { this._localStream = this._streamFactory(path); } else { this._localStreamError = new Error( `As a result of LOCAL INFILE command server wants to read ${path} file, but as of v2.0 you must provide streamFactory option returning ReadStream.` ); connection.writePacket(EmptyPacket); return this.infileOk; } const onConnectionError = () => { this._unpipeStream(); }; const onDrain = () => { this._localStream.resume(); }; const onPause = () => { this._localStream.pause(); }; const onData = function(data) { const dataWithHeader = Buffer.allocUnsafe(data.length + 4); data.copy(dataWithHeader, 4); connection.writePacket( new Packets.Packet(0, dataWithHeader, 0, dataWithHeader.length) ); }; const onEnd = () => { connection.removeListener('error', onConnectionError); connection.writePacket(EmptyPacket); }; const onError = err => { this._localStreamError = err; connection.removeListener('error', onConnectionError); connection.writePacket(EmptyPacket); }; this._unpipeStream = () => { connection.stream.removeListener('pause', onPause); connection.stream.removeListener('drain', onDrain); this._localStream.removeListener('data', onData); this._localStream.removeListener('end', onEnd); this._localStream.removeListener('error', onError); }; connection.stream.on('pause', onPause); connection.stream.on('drain', onDrain); this._localStream.on('data', onData); this._localStream.on('end', onEnd); this._localStream.on('error', onError); connection.once('error', onConnectionError); return this.infileOk; } readField(packet, connection) { this._receivedFieldsCount++; // Often there is much more data in the column definition than in the row itself // If you set manually _fields[0] to array of ColumnDefinition's (from previous call) // you can 'cache' result of parsing. Field packets still received, but ignored in that case // this is the reason _receivedFieldsCount exist (otherwise we could just use current length of fields array) if (this._fields[this._resultIndex].length !== this._fieldCount) { const field = new Packets.ColumnDefinition( packet, connection.clientEncoding ); this._fields[this._resultIndex].push(field); if (connection.config.debug) { /* eslint-disable no-console */ console.log(' Column definition:'); console.log(` name: ${field.name}`); console.log(` type: ${field.columnType}`); console.log(` flags: ${field.flags}`); /* eslint-enable no-console */ } } // last field received if (this._receivedFieldsCount === this._fieldCount) { const fields = this._fields[this._resultIndex]; this.emit('fields', fields); this._rowParser = new (getTextParser(fields, this.options, connection.config))(fields); return Query.prototype.fieldsEOF; } return Query.prototype.readField; } fieldsEOF(packet, connection) { // check EOF if (!packet.isEOF()) { return connection.protocolError('Expected EOF packet'); } return this.row; } /* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ row(packet, _connection) { if (packet.isEOF()) { const status = packet.eofStatusFlags(); const moreResults = status & ServerStatus.SERVER_MORE_RESULTS_EXISTS; if (moreResults) { this._resultIndex++; return Query.prototype.resultsetHeader; } return this.done(); } let row; try { row = this._rowParser.next( packet, this._fields[this._resultIndex], this.options ); } catch (err) { this._localStreamError = err; return this.doneInsert(null); } if (this.onResult) { this._rows[this._resultIndex].push(row); } else { this.emit('result', row); } return Query.prototype.row; } infileOk(packet, connection) { const rs = new Packets.ResultSetHeader(packet, connection); return this.doneInsert(rs); } stream(options) { options = options || {}; options.objectMode = true; const stream = new Readable(options); stream._read = () => { this._connection && this._connection.resume(); }; this.on('result', row => { if (!stream.push(row)) { this._connection.pause(); } stream.emit('result', row); // replicate old emitter }); this.on('error', err => { stream.emit('error', err); // Pass on any errors }); this.on('end', () => { stream.push(null); // pushing null, indicating EOF stream.emit('close'); // notify readers that query has completed }); this.on('fields', fields => { stream.emit('fields', fields); // replicate old emitter }); return stream; } _setTimeout() { if (this.timeout) { const timeoutHandler = this._handleTimeoutError.bind(this); this.queryTimeout = Timers.setTimeout( timeoutHandler, this.timeout ); } } _handleTimeoutError() { if (this.queryTimeout) { Timers.clearTimeout(this.queryTimeout); this.queryTimeout = null; } const err = new Error('Query inactivity timeout'); err.errorno = 'PROTOCOL_SEQUENCE_TIMEOUT'; err.code = 'PROTOCOL_SEQUENCE_TIMEOUT'; err.syscall = 'query'; if (this.onResult) { this.onResult(err); } else { this.emit('error', err); } } } Query.prototype.catch = Query.prototype.then; module.exports = Query; change_user.js 0000755 00000003341 15074741520 0007376 0 ustar 00 'use strict'; const Command = require('./command.js'); const Packets = require('../packets/index.js'); const ClientHandshake = require('./client_handshake.js'); const CharsetToEncoding = require('../constants/charset_encodings.js'); class ChangeUser extends Command { constructor(options, callback) { super(); this.onResult = callback; this.user = options.user; this.password = options.password; this.database = options.database; this.passwordSha1 = options.passwordSha1; this.charsetNumber = options.charsetNumber; this.currentConfig = options.currentConfig; } start(packet, connection) { const newPacket = new Packets.ChangeUser({ flags: connection.config.clientFlags, user: this.user, database: this.database, charsetNumber: this.charsetNumber, password: this.password, passwordSha1: this.passwordSha1, authPluginData1: connection._handshakePacket.authPluginData1, authPluginData2: connection._handshakePacket.authPluginData2 }); this.currentConfig.user = this.user; this.currentConfig.password = this.password; this.currentConfig.database = this.database; this.currentConfig.charsetNumber = this.charsetNumber; connection.clientEncoding = CharsetToEncoding[this.charsetNumber]; // reset prepared statements cache as all statements become invalid after changeUser connection._statements.reset(); connection.writePacket(newPacket.toPacket()); return ChangeUser.prototype.handshakeResult; } } ChangeUser.prototype.handshakeResult = ClientHandshake.prototype.handshakeResult; ChangeUser.prototype.calculateNativePasswordAuthToken = ClientHandshake.prototype.calculateNativePasswordAuthToken; module.exports = ChangeUser; close_statement.js 0000755 00000000551 15074741520 0010304 0 ustar 00 'use strict'; const Command = require('./command'); const Packets = require('../packets/index.js'); class CloseStatement extends Command { constructor(id) { super(); this.id = id; } start(packet, connection) { connection.writePacket(new Packets.CloseStatement(this.id).toPacket(1)); return null; } } module.exports = CloseStatement; server_handshake.js 0000755 00000012074 15074741520 0010432 0 ustar 00 'use strict'; const CommandCode = require('../constants/commands.js'); const Errors = require('../constants/errors.js'); const Command = require('./command.js'); const Packets = require('../packets/index.js'); class ServerHandshake extends Command { constructor(args) { super(); this.args = args; /* this.protocolVersion = args.protocolVersion || 10; this.serverVersion = args.serverVersion; this.connectionId = args.connectionId, this.statusFlags = args.statusFlags, this.characterSet = args.characterSet, this.capabilityFlags = args.capabilityFlags || 512; */ } start(packet, connection) { const serverHelloPacket = new Packets.Handshake(this.args); this.serverHello = serverHelloPacket; serverHelloPacket.setScrambleData(err => { if (err) { connection.emit('error', new Error('Error generating random bytes')); return; } connection.writePacket(serverHelloPacket.toPacket(0)); }); return ServerHandshake.prototype.readClientReply; } readClientReply(packet, connection) { // check auth here const clientHelloReply = Packets.HandshakeResponse.fromPacket(packet); // TODO check we don't have something similar already connection.clientHelloReply = clientHelloReply; if (this.args.authCallback) { this.args.authCallback( { user: clientHelloReply.user, database: clientHelloReply.database, address: connection.stream.remoteAddress, authPluginData1: this.serverHello.authPluginData1, authPluginData2: this.serverHello.authPluginData2, authToken: clientHelloReply.authToken }, (err, mysqlError) => { // if (err) if (!mysqlError) { connection.writeOk(); } else { // TODO create constants / errorToCode // 1045 = ER_ACCESS_DENIED_ERROR connection.writeError({ message: mysqlError.message || '', code: mysqlError.code || 1045 }); connection.close(); } } ); } else { connection.writeOk(); } return ServerHandshake.prototype.dispatchCommands; } dispatchCommands(packet, connection) { // command from client to server let knownCommand = true; const encoding = connection.clientHelloReply.encoding; const commandCode = packet.readInt8(); switch (commandCode) { case CommandCode.QUIT: if (connection.listeners('quit').length) { connection.emit('quit'); } else { connection.stream.end(); } break; case CommandCode.INIT_DB: if (connection.listeners('init_db').length) { const schemaName = packet.readString(undefined, encoding); connection.emit('init_db', schemaName); } else { connection.writeOk(); } break; case CommandCode.QUERY: if (connection.listeners('query').length) { const query = packet.readString(undefined, encoding); connection.emit('query', query); } else { connection.writeError({ code: Errors.HA_ERR_INTERNAL_ERROR, message: 'No query handler' }); } break; case CommandCode.FIELD_LIST: if (connection.listeners('field_list').length) { const table = packet.readNullTerminatedString(); const fields = packet.readString(undefined, encoding); connection.emit('field_list', table, fields); } else { connection.writeError({ code: Errors.ER_WARN_DEPRECATED_SYNTAX, message: 'As of MySQL 5.7.11, COM_FIELD_LIST is deprecated and will be removed in a future version of MySQL.' }); } break; case CommandCode.PING: if (connection.listeners('ping').length) { connection.emit('ping'); } else { connection.writeOk(); } break; default: knownCommand = false; } if (connection.listeners('packet').length) { connection.emit('packet', packet.clone(), knownCommand, commandCode); } else if (!knownCommand) { // eslint-disable-next-line no-console console.log('Unknown command:', commandCode); } return ServerHandshake.prototype.dispatchCommands; } } module.exports = ServerHandshake; // TODO: implement server-side 4.1 authentication /* 4.1 authentication: (http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/password.c) SERVER: public_seed=create_random_string() send(public_seed) CLIENT: recv(public_seed) hash_stage1=sha1("password") hash_stage2=sha1(hash_stage1) reply=xor(hash_stage1, sha1(public_seed,hash_stage2) // this three steps are done in scramble() send(reply) SERVER: recv(reply) hash_stage1=xor(reply, sha1(public_seed,hash_stage2)) candidate_hash2=sha1(hash_stage1) check(candidate_hash2==hash_stage2) server stores sha1(sha1(password)) ( hash_stag2) */
SAVE
CANCEL