{"name":"@aws-sdk/client-sts","version":"3.890.0","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sts@3.890.0","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"}],"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"dist":{"shasum":"326ce00cc3509fa18b0b8479c8bbbab5a05c60eb","tarball":"http://registry-npm.ywwl.com/@aws-sdk/client-sts/download/@aws-sdk/client-sts-3.890.0.tgz","fileCount":105,"integrity":"sha512-yCJTucDAV1r5j5sdec4873uLQPOjxpHiatIsJ5/6JWuKPsxqZsHK25/qrQLzdz3IP00UIac0ppo7VKFQzwxJ4A==","signatures":[{"sig":"MEYCIQDZfqz/TBA1gq2O0AAf77Ut4Y/+Zpooa/mwNAr2NcCoPAIhAMWInMPzlIXvlaSZTPO4IFlXy87F9jydTHHq+fQDLmFP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":474218,"size":70061,"noattachment":false,"key":"/@aws-sdk/client-sts/-/@aws-sdk/client-sts-3.890.0.tgz"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"engines":{"node":">=18.0.0"},"scripts":{"test":"yarn g:vitest run","build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","build:es":"tsc -p tsconfig.es.json","build:cjs":"node ../../scripts/compilation/inline client-sts","test:watch":"yarn g:vitest watch","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},"repository":{"url":"git+https://github.com/aws/aws-sdk-js-v3.git","type":"git","directory":"clients/client-sts"},"_npmVersion":"11.4.2","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","directories":{},"sideEffects":false,"_nodeVersion":"20.19.2","dependencies":{"tslib":"^2.6.2","@smithy/core":"^3.11.0","@aws-sdk/core":"3.890.0","@smithy/types":"^4.5.0","@aws-sdk/types":"3.887.0","@smithy/hash-node":"^4.1.1","@smithy/util-utf8":"^4.1.0","@smithy/url-parser":"^4.1.1","@smithy/util-retry":"^4.1.1","@smithy/util-base64":"^4.1.0","@aws-crypto/sha256-js":"5.2.0","@smithy/protocol-http":"^5.2.1","@smithy/smithy-client":"^4.6.2","@smithy/util-endpoints":"^3.1.2","@aws-sdk/util-endpoints":"3.890.0","@smithy/config-resolver":"^4.2.2","@smithy/util-middleware":"^4.1.1","@smithy/middleware-retry":"^4.2.2","@smithy/middleware-serde":"^4.1.1","@smithy/middleware-stack":"^4.1.1","@smithy/node-http-handler":"^4.2.1","@aws-crypto/sha256-browser":"5.2.0","@aws-sdk/middleware-logger":"3.887.0","@smithy/fetch-http-handler":"^5.2.1","@smithy/invalid-dependency":"^4.1.1","@smithy/middleware-endpoint":"^4.2.2","@smithy/node-config-provider":"^4.2.2","@aws-sdk/util-user-agent-node":"3.890.0","@smithy/util-body-length-node":"^4.1.0","@aws-sdk/middleware-user-agent":"3.890.0","@aws-sdk/middleware-host-header":"3.887.0","@aws-sdk/region-config-resolver":"3.890.0","@smithy/util-defaults-mode-node":"^4.1.2","@aws-sdk/util-user-agent-browser":"3.887.0","@smithy/util-body-length-browser":"^4.1.0","@aws-sdk/credential-provider-node":"3.890.0","@smithy/middleware-content-length":"^4.1.1","@smithy/util-defaults-mode-browser":"^4.1.2","@aws-sdk/middleware-recursion-detection":"3.887.0"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","typescript":"~5.8.3","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","@tsconfig/node18":"18.2.4"},"_npmOperationalInternal":{"tmp":"tmp/client-sts_3.890.0_1758050116042_0.6694658248690193","host":"s3://npm-registry-packages-npm-production"},"readme":"<!-- generated file, do not edit directly -->\n\n# @aws-sdk/client-sts\n\n## Description\n\nAWS SDK for JavaScript STS Client for Node.js, Browser and React Native.\n\n<fullname>Security Token Service</fullname>\n<p>Amazon Web Services provides Security Token Service (STS) as a web service that enables you to request temporary,\nlimited-privilege credentials for users. This guide describes the STS API. For more\ninformation, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html\">Temporary Security Credentials</a>\nin the <i>IAM User Guide</i>.</p>\n<note>\n<p>As an alternative to using the API, you can use one of the Amazon Web Services SDKs, which consist of\nlibraries and sample code for various programming languages and platforms such as Java,\nRuby, .NET, iOS, Android, and others. The SDKs provide a convenient way to create\nprogrammatic access to STS. For example, the SDKs can cryptographically sign requests,\nmanage errors, and retry requests automatically. For information about the Amazon Web Services SDKs, see\n<a href=\"http://aws.amazon.com/tools/\">Tools to Build on Amazon Web Services</a>.</p>\n</note>\n<p>For information about setting up signatures and authorization through the API, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html\">Signing Amazon Web Services\nAPI Requests</a> in the <i>Amazon Web Services General Reference</i>. For general information\nabout the Query API, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html\">Making Query Requests</a> in the\n<i>IAM User Guide</i>. For information about using security tokens with\nother Amazon Web Services products, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html\">Amazon Web Services Services\nThat Work with IAM</a> in the <i>IAM User Guide</i>.</p>\n<p>For information about STS endpoints, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_region-endpoints.html\">STS Regions and\nendpoints</a> in the <i>IAM User Guide</i>. For information about\nlogging STS API calls, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html\">Logging IAM and STS API calls\nwith CloudTrail</a> in the <i>IAM User Guide</i>.</p>\n\n## Installing\n\nTo install this package, use the CLI of your favorite package manager:\n\n- `npm install @aws-sdk/client-sts`\n- `yarn add @aws-sdk/client-sts`\n- `pnpm add @aws-sdk/client-sts`\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands.\nTo send a request, you only need to import the `STSClient` and\nthe commands you need, for example `GetCallerIdentityCommand`:\n\n```js\n// ES5 example\nconst { STSClient, GetCallerIdentityCommand } = require(\"@aws-sdk/client-sts\");\n```\n\n```ts\n// ES6+ example\nimport { STSClient, GetCallerIdentityCommand } from \"@aws-sdk/client-sts\";\n```\n\n### Usage\n\nTo send a request:\n\n- Instantiate a client with configuration (e.g. credentials, region).\n  - See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.\n  - See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.\n- Instantiate a command with input parameters.\n- Call the `send` operation on the client, providing the command object as input.\n\n```js\nconst client = new STSClient({ region: \"REGION\" });\n\nconst params = { /** input parameters */ };\nconst command = new GetCallerIdentityCommand(params);\n```\n\n#### Async/await\n\nWe recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)\noperator to wait for the promise returned by send operation as follows:\n\n```js\n// async/await.\ntry {\n  const data = await client.send(command);\n  // process data.\n} catch (error) {\n  // error handling.\n} finally {\n  // finally.\n}\n```\n\n#### Promises\n\nYou can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).\n\n```js\nclient\n  .send(command)\n  .then((data) => {\n    // process data.\n  })\n  .catch((error) => {\n    // error handling.\n  })\n  .finally(() => {\n    // finally.\n  });\n```\n\n#### Aggregated client\n\nThe aggregated client class is exported from the same package, but without the \"Client\" suffix.\n\n`STS` extends `STSClient` and additionally supports all operations, waiters, and paginators as methods.\nThis style may be familiar to you from the AWS SDK for JavaScript v2.\n\nIf you are bundling the AWS SDK, we recommend using only the bare-bones client (`STSClient`).\nMore details are in the blog post on\n[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).\n\n```ts\nimport { STS } from \"@aws-sdk/client-sts\";\n\nconst client = new STS({ region: \"REGION\" });\n\n// async/await.\ntry {\n  const data = await client.getCallerIdentity(params);\n  // process data.\n} catch (error) {\n  // error handling.\n}\n\n// Promises.\nclient\n  .getCallerIdentity(params)\n  .then((data) => {\n    // process data.\n  })\n  .catch((error) => {\n    // error handling.\n  });\n\n// callbacks (not recommended).\nclient.getCallerIdentity(params, (err, data) => {\n  // process err and data.\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information,\nas well as response metadata (e.g. request id).\n\n```js\ntry {\n  const data = await client.send(command);\n  // process data.\n} catch (error) {\n  const { requestId, cfId, extendedRequestId } = error.$metadata;\n  console.log({ requestId, cfId, extendedRequestId });\n  /**\n   * The keys within exceptions are also parsed.\n   * You can access them by specifying exception names:\n   * if (error.name === 'SomeServiceException') {\n   *     const value = error.specialKeyInException;\n   * }\n   */\n}\n```\n\nSee also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).\n\n## Getting Help\n\nPlease use these community resources for getting help.\nWe use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.\n\n- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)\n  or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).\n- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)\n  on AWS Developer Blog.\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.\n- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).\n\nTo test your universal JavaScript code in Node.js, browser and react-native environments,\nvisit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sts` package is updated.\nTo contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n## Client Commands (Operations List)\n\n<details>\n<summary>\nAssumeRole\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleCommandOutput/)\n</details>\n<details>\n<summary>\nAssumeRoleWithSAML\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleWithSAMLCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithSAMLCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithSAMLCommandOutput/)\n</details>\n<details>\n<summary>\nAssumeRoleWithWebIdentity\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRoleWithWebIdentityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithWebIdentityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRoleWithWebIdentityCommandOutput/)\n</details>\n<details>\n<summary>\nAssumeRoot\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/AssumeRootCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRootCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/AssumeRootCommandOutput/)\n</details>\n<details>\n<summary>\nDecodeAuthorizationMessage\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/DecodeAuthorizationMessageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/DecodeAuthorizationMessageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/DecodeAuthorizationMessageCommandOutput/)\n</details>\n<details>\n<summary>\nGetAccessKeyInfo\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetAccessKeyInfoCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetAccessKeyInfoCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetAccessKeyInfoCommandOutput/)\n</details>\n<details>\n<summary>\nGetCallerIdentity\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetCallerIdentityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandOutput/)\n</details>\n<details>\n<summary>\nGetDelegatedAccessToken\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetDelegatedAccessTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetDelegatedAccessTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetDelegatedAccessTokenCommandOutput/)\n</details>\n<details>\n<summary>\nGetFederationToken\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetFederationTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetFederationTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetFederationTokenCommandOutput/)\n</details>\n<details>\n<summary>\nGetSessionToken\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetSessionTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetSessionTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetSessionTokenCommandOutput/)\n</details>\n<details>\n<summary>\nGetWebIdentityToken\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetWebIdentityTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetWebIdentityTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetWebIdentityTokenCommandOutput/)\n</details>\n","publish_time":1758050116214,"_cnpm_publish_time":1758050116214,"dist-tags":{"alpha":"1.0.0-alpha.18","beta":"1.0.0-beta.5","gamma":"1.0.0-gamma.11","latest":"3.1163.0","rc":"3.5.1-rc.0"}}