Backend half

This commit is contained in:
2025-07-11 19:56:28 +02:00
parent fa868e7c1d
commit 8600fa7c1d
19426 changed files with 3750448 additions and 8108 deletions
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+252
View File
@@ -0,0 +1,252 @@
<!-- generated file, do not edit directly -->
# @aws-sdk/client-sso
## Description
AWS SDK for JavaScript SSO Client for Node.js, Browser and React Native.
<p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
assigned to them and get federated into the application.</p>
<note>
<p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
<code>identitystore</code> API namespaces will continue to retain their original name for
backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
</note>
<p>This reference guide describes the IAM Identity Center Portal operations that you can call
programatically and includes detailed information on data types and errors.</p>
<note>
<p>AWS provides SDKs that consist of libraries and sample code for various programming
languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
</note>
## Installing
To install this package, simply type add or install @aws-sdk/client-sso
using your favorite package manager:
- `npm install @aws-sdk/client-sso`
- `yarn add @aws-sdk/client-sso`
- `pnpm add @aws-sdk/client-sso`
## Getting Started
### Import
The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the `SSOClient` and
the commands you need, for example `ListAccountsCommand`:
```js
// ES5 example
const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso");
```
```ts
// ES6+ example
import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso";
```
### Usage
To send a request, you:
- Initiate client with configuration (e.g. credentials, region).
- Initiate command with input parameters.
- Call `send` operation on client with command object as input.
- If you are using a custom http handler, you may call `destroy()` to close open connections.
```js
// a client can be shared by different commands.
const client = new SSOClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ListAccountsCommand(params);
```
#### Async/await
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
operator to wait for the promise returned by send operation as follows:
```js
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
```
Async-await is clean, concise, intuitive, easy to debug and has better error handling
as compared to using Promise chains or callbacks.
#### Promises
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
to execute send operation.
```js
client.send(command).then(
(data) => {
// process data.
},
(error) => {
// error handling.
}
);
```
Promises can also be called using `.catch()` and `.finally()` as follows:
```js
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
```
#### Callbacks
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
but they are supported by the send operation.
```js
// callbacks.
client.send(command, (err, data) => {
// process err and data.
});
```
#### v2 compatible style
The client can also send requests using v2 compatible style.
However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
```ts
import * as AWS from "@aws-sdk/client-sso";
const client = new AWS.SSO({ region: "REGION" });
// async/await.
try {
const data = await client.listAccounts(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAccounts(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks.
client.listAccounts(params, (err, data) => {
// process err and data.
});
```
### Troubleshooting
When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).
```js
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
```
## Getting Help
Please use these community resources for getting help.
We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
on AWS Developer Blog.
- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
- 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).
To test your universal JavaScript code in Node.js, browser and react-native environments,
visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).
## Contributing
This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sso` package is updated.
To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).
## License
This SDK is distributed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
see LICENSE for more information.
## Client Commands (Operations List)
<details>
<summary>
GetRoleCredentials
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/GetRoleCredentialsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandOutput/)
</details>
<details>
<summary>
ListAccountRoles
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountRolesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandOutput/)
</details>
<details>
<summary>
ListAccounts
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandOutput/)
</details>
<details>
<summary>
Logout
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/LogoutCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandOutput/)
</details>
@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
const core_1 = require("@aws-sdk/core");
const util_middleware_1 = require("@smithy/util-middleware");
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "awsssoportal",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetRoleCredentials": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccountRoles": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccounts": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "Logout": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
const util_endpoints_2 = require("@smithy/util-endpoints");
const ruleset_1 = require("./ruleset");
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ruleSet = void 0;
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
+625
View File
@@ -0,0 +1,625 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,
GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,
InvalidRequestException: () => InvalidRequestException,
ListAccountRolesCommand: () => ListAccountRolesCommand,
ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,
ListAccountsCommand: () => ListAccountsCommand,
ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,
LogoutCommand: () => LogoutCommand,
LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,
ResourceNotFoundException: () => ResourceNotFoundException,
RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,
SSO: () => SSO,
SSOClient: () => SSOClient,
SSOServiceException: () => SSOServiceException,
TooManyRequestsException: () => TooManyRequestsException,
UnauthorizedException: () => UnauthorizedException,
__Client: () => import_smithy_client.Client,
paginateListAccountRoles: () => paginateListAccountRoles,
paginateListAccounts: () => paginateListAccounts
});
module.exports = __toCommonJS(index_exports);
// src/SSOClient.ts
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
var import_middleware_logger = require("@aws-sdk/middleware-logger");
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
var import_config_resolver = require("@smithy/config-resolver");
var import_core = require("@smithy/core");
var import_middleware_content_length = require("@smithy/middleware-content-length");
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
var import_middleware_retry = require("@smithy/middleware-retry");
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
// src/endpoint/EndpointParameters.ts
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "awsssoportal"
});
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
// src/SSOClient.ts
var import_runtimeConfig = require("././runtimeConfig");
// src/runtimeExtensions.ts
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
var import_protocol_http = require("@smithy/protocol-http");
var import_smithy_client = require("@smithy/smithy-client");
// src/auth/httpAuthExtensionConfiguration.ts
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
} else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
}
};
}, "getHttpAuthExtensionConfiguration");
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials()
};
}, "resolveHttpAuthRuntimeConfig");
// src/runtimeExtensions.ts
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
getHttpAuthExtensionConfiguration(runtimeConfig)
);
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(
runtimeConfig,
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
resolveHttpAuthRuntimeConfig(extensionConfiguration)
);
}, "resolveRuntimeExtensions");
// src/SSOClient.ts
var SSOClient = class extends import_smithy_client.Client {
static {
__name(this, "SSOClient");
}
/**
* The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
this.middlewareStack.use(
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials
}), "identityProviderConfigProvider")
})
);
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy() {
super.destroy();
}
};
// src/SSO.ts
// src/commands/GetRoleCredentialsCommand.ts
var import_middleware_serde = require("@smithy/middleware-serde");
// src/models/models_0.ts
// src/models/SSOServiceException.ts
var SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {
static {
__name(this, "SSOServiceException");
}
/**
* @internal
*/
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SSOServiceException.prototype);
}
};
// src/models/models_0.ts
var InvalidRequestException = class _InvalidRequestException extends SSOServiceException {
static {
__name(this, "InvalidRequestException");
}
name = "InvalidRequestException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _InvalidRequestException.prototype);
}
};
var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {
static {
__name(this, "ResourceNotFoundException");
}
name = "ResourceNotFoundException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
}
};
var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {
static {
__name(this, "TooManyRequestsException");
}
name = "TooManyRequestsException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
}
};
var UnauthorizedException = class _UnauthorizedException extends SSOServiceException {
static {
__name(this, "UnauthorizedException");
}
name = "UnauthorizedException";
$fault = "client";
/**
* @internal
*/
constructor(opts) {
super({
name: "UnauthorizedException",
$fault: "client",
...opts
});
Object.setPrototypeOf(this, _UnauthorizedException.prototype);
}
};
var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "GetRoleCredentialsRequestFilterSensitiveLog");
var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },
...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }
}), "RoleCredentialsFilterSensitiveLog");
var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }
}), "GetRoleCredentialsResponseFilterSensitiveLog");
var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "ListAccountRolesRequestFilterSensitiveLog");
var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "ListAccountsRequestFilterSensitiveLog");
var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
...obj,
...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
}), "LogoutRequestFilterSensitiveLog");
// src/protocols/Aws_restJson1.ts
var import_core2 = require("@aws-sdk/core");
var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/federation/credentials");
const query = (0, import_smithy_client.map)({
[_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],
[_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetRoleCredentialsCommand");
var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/assignment/roles");
const query = (0, import_smithy_client.map)({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
[_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListAccountRolesCommand");
var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/assignment/accounts");
const query = (0, import_smithy_client.map)({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListAccountsCommand");
var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {
const b = (0, import_core.requestBuilder)(input, context);
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xasbt]: input[_aT]
});
b.bp("/logout");
let body;
b.m("POST").h(headers).b(body);
return b.build();
}, "se_LogoutCommand");
var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
roleCredentials: import_smithy_client._json
});
Object.assign(contents, doc);
return contents;
}, "de_GetRoleCredentialsCommand");
var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
nextToken: import_smithy_client.expectString,
roleList: import_smithy_client._json
});
Object.assign(contents, doc);
return contents;
}, "de_ListAccountRolesCommand");
var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
const doc = (0, import_smithy_client.take)(data, {
accountList: import_smithy_client._json,
nextToken: import_smithy_client.expectString
});
Object.assign(contents, doc);
return contents;
}, "de_ListAccountsCommand");
var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_LogoutCommand");
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
const parsedOutput = {
...output,
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
};
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode
});
}
}, "de_CommandError");
var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);
var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ResourceNotFoundExceptionRes");
var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new TooManyRequestsException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_TooManyRequestsExceptionRes");
var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
const doc = (0, import_smithy_client.take)(data, {
message: import_smithy_client.expectString
});
Object.assign(contents, doc);
const exception = new UnauthorizedException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_UnauthorizedExceptionRes");
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var _aI = "accountId";
var _aT = "accessToken";
var _ai = "account_id";
var _mR = "maxResults";
var _mr = "max_result";
var _nT = "nextToken";
var _nt = "next_token";
var _rN = "roleName";
var _rn = "role_name";
var _xasbt = "x-amz-sso_bearer_token";
// src/commands/GetRoleCredentialsCommand.ts
var GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {
static {
__name(this, "GetRoleCredentialsCommand");
}
};
// src/commands/ListAccountRolesCommand.ts
var ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {
static {
__name(this, "ListAccountRolesCommand");
}
};
// src/commands/ListAccountsCommand.ts
var ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {
static {
__name(this, "ListAccountsCommand");
}
};
// src/commands/LogoutCommand.ts
var LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {
static {
__name(this, "LogoutCommand");
}
};
// src/SSO.ts
var commands = {
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand
};
var SSO = class extends SSOClient {
static {
__name(this, "SSO");
}
};
(0, import_smithy_client.createAggregatedClient)(commands, SSO);
// src/pagination/ListAccountRolesPaginator.ts
var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
// src/pagination/ListAccountsPaginator.ts
var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SSOServiceException,
__Client,
SSOClient,
SSO,
$Command,
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand,
paginateListAccountRoles,
paginateListAccounts,
InvalidRequestException,
ResourceNotFoundException,
TooManyRequestsException,
UnauthorizedException,
GetRoleCredentialsRequestFilterSensitiveLog,
RoleCredentialsFilterSensitiveLog,
GetRoleCredentialsResponseFilterSensitiveLog,
ListAccountRolesRequestFilterSensitiveLog,
ListAccountsRequestFilterSensitiveLog,
LogoutRequestFilterSensitiveLog
});
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const tslib_1 = require("tslib");
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
const config_resolver_1 = require("@smithy/config-resolver");
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
const invalid_dependency_1 = require("@smithy/invalid-dependency");
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
const util_retry_1 = require("@smithy/util-retry");
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
const smithy_client_1 = require("@smithy/smithy-client");
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
const getRuntimeConfig = (config) => {
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
return {
...clientSharedValues,
...config,
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const tslib_1 = require("tslib");
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
const core_1 = require("@aws-sdk/core");
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
const config_resolver_1 = require("@smithy/config-resolver");
const hash_node_1 = require("@smithy/hash-node");
const middleware_retry_1 = require("@smithy/middleware-retry");
const node_config_provider_1 = require("@smithy/node-config-provider");
const node_http_handler_1 = require("@smithy/node-http-handler");
const util_body_length_node_1 = require("@smithy/util-body-length-node");
const util_retry_1 = require("@smithy/util-retry");
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
const smithy_client_1 = require("@smithy/smithy-client");
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
const smithy_client_2 = require("@smithy/smithy-client");
const getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const loaderConfig = {
profile: config?.profile,
logger: clientSharedValues.logger,
};
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
(0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const sha256_js_1 = require("@aws-crypto/sha256-js");
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
const getRuntimeConfig = (config) => {
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
return {
...browserDefaults,
...config,
runtime: "react-native",
sha256: config?.sha256 ?? sha256_js_1.Sha256,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const core_1 = require("@aws-sdk/core");
const core_2 = require("@smithy/core");
const smithy_client_1 = require("@smithy/smithy-client");
const url_parser_1 = require("@smithy/url-parser");
const util_base64_1 = require("@smithy/util-base64");
const util_utf8_1 = require("@smithy/util-utf8");
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
const endpointResolver_1 = require("./endpoint/endpointResolver");
const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
serviceId: config?.serviceId ?? "SSO",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;
+15
View File
@@ -0,0 +1,15 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { GetRoleCredentialsCommand, } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommand, } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommand, } from "./commands/ListAccountsCommand";
import { LogoutCommand } from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
const commands = {
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand,
};
export class SSO extends SSOClient {
}
createAggregatedClient(commands, SSO);
@@ -0,0 +1,48 @@
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
import { resolveRegionConfig } from "@smithy/config-resolver";
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
import { Client as __Client, } from "@smithy/smithy-client";
import { defaultSSOHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
import { resolveRuntimeExtensions } from "./runtimeExtensions";
export { __Client };
export class SSOClient extends __Client {
config;
constructor(...[configuration]) {
const _config_0 = __getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = resolveUserAgentConfig(_config_1);
const _config_3 = resolveRetryConfig(_config_2);
const _config_4 = resolveRegionConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveEndpointConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use(getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
}
@@ -0,0 +1,38 @@
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
}
else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
},
};
};
export const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};
@@ -0,0 +1,62 @@
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
export const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: getSmithyContext(context).operation,
region: (await normalizeProvider(config.region)()) ||
(() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "awsssoportal",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
export const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetRoleCredentials": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccountRoles": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "ListAccounts": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
case "Logout": {
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
export const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = resolveAwsSdkSigV4Config(config);
return Object.assign(config_0, {
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
});
};
@@ -0,0 +1,23 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from "../models/models_0";
import { de_GetRoleCredentialsCommand, se_GetRoleCredentialsCommand } from "../protocols/Aws_restJson1";
export { $Command };
export class GetRoleCredentialsCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("SWBPortalService", "GetRoleCredentials", {})
.n("SSOClient", "GetRoleCredentialsCommand")
.f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog)
.ser(se_GetRoleCredentialsCommand)
.de(de_GetRoleCredentialsCommand)
.build() {
}
@@ -0,0 +1,23 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListAccountRolesRequestFilterSensitiveLog, } from "../models/models_0";
import { de_ListAccountRolesCommand, se_ListAccountRolesCommand } from "../protocols/Aws_restJson1";
export { $Command };
export class ListAccountRolesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("SWBPortalService", "ListAccountRoles", {})
.n("SSOClient", "ListAccountRolesCommand")
.f(ListAccountRolesRequestFilterSensitiveLog, void 0)
.ser(se_ListAccountRolesCommand)
.de(de_ListAccountRolesCommand)
.build() {
}
@@ -0,0 +1,23 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListAccountsRequestFilterSensitiveLog } from "../models/models_0";
import { de_ListAccountsCommand, se_ListAccountsCommand } from "../protocols/Aws_restJson1";
export { $Command };
export class ListAccountsCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("SWBPortalService", "ListAccounts", {})
.n("SSOClient", "ListAccountsCommand")
.f(ListAccountsRequestFilterSensitiveLog, void 0)
.ser(se_ListAccountsCommand)
.de(de_ListAccountsCommand)
.build() {
}
@@ -0,0 +1,23 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { LogoutRequestFilterSensitiveLog } from "../models/models_0";
import { de_LogoutCommand, se_LogoutCommand } from "../protocols/Aws_restJson1";
export { $Command };
export class LogoutCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("SWBPortalService", "Logout", {})
.n("SSOClient", "LogoutCommand")
.f(LogoutRequestFilterSensitiveLog, void 0)
.ser(se_LogoutCommand)
.de(de_LogoutCommand)
.build() {
}
@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";
@@ -0,0 +1,13 @@
export const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "awsssoportal",
});
};
export const commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
@@ -0,0 +1,14 @@
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
import { ruleSet } from "./ruleset";
const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
export const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1,4 @@
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
export const ruleSet = _data;
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,6 @@
export * from "./SSOClient";
export * from "./SSO";
export * from "./commands";
export * from "./pagination";
export * from "./models";
export { SSOServiceException } from "./models/SSOServiceException";
@@ -0,0 +1,8 @@
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
export { __ServiceException };
export class SSOServiceException extends __ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, SSOServiceException.prototype);
}
}
@@ -0,0 +1 @@
export * from "./models_0";
@@ -0,0 +1,75 @@
import { SENSITIVE_STRING } from "@smithy/smithy-client";
import { SSOServiceException as __BaseException } from "./SSOServiceException";
export class InvalidRequestException extends __BaseException {
name = "InvalidRequestException";
$fault = "client";
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidRequestException.prototype);
}
}
export class ResourceNotFoundException extends __BaseException {
name = "ResourceNotFoundException";
$fault = "client";
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
export class TooManyRequestsException extends __BaseException {
name = "TooManyRequestsException";
$fault = "client";
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
}
}
export class UnauthorizedException extends __BaseException {
name = "UnauthorizedException";
$fault = "client";
constructor(opts) {
super({
name: "UnauthorizedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, UnauthorizedException.prototype);
}
}
export const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
});
export const RoleCredentialsFilterSensitiveLog = (obj) => ({
...obj,
...(obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING }),
...(obj.sessionToken && { sessionToken: SENSITIVE_STRING }),
});
export const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({
...obj,
...(obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }),
});
export const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
});
export const ListAccountsRequestFilterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
});
export const LogoutRequestFilterSensitiveLog = (obj) => ({
...obj,
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
});
@@ -0,0 +1 @@
export {};
@@ -0,0 +1,4 @@
import { createPaginator } from "@smithy/core";
import { ListAccountRolesCommand, } from "../commands/ListAccountRolesCommand";
import { SSOClient } from "../SSOClient";
export const paginateListAccountRoles = createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,4 @@
import { createPaginator } from "@smithy/core";
import { ListAccountsCommand, } from "../commands/ListAccountsCommand";
import { SSOClient } from "../SSOClient";
export const paginateListAccounts = createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";
@@ -0,0 +1,210 @@
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
import { requestBuilder as rb } from "@smithy/core";
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
import { SSOServiceException as __BaseException } from "../models/SSOServiceException";
export const se_GetRoleCredentialsCommand = async (input, context) => {
const b = rb(input, context);
const headers = map({}, isSerializableHeaderValue, {
[_xasbt]: input[_aT],
});
b.bp("/federation/credentials");
const query = map({
[_rn]: [, __expectNonNull(input[_rN], `roleName`)],
[_ai]: [, __expectNonNull(input[_aI], `accountId`)],
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
};
export const se_ListAccountRolesCommand = async (input, context) => {
const b = rb(input, context);
const headers = map({}, isSerializableHeaderValue, {
[_xasbt]: input[_aT],
});
b.bp("/assignment/roles");
const query = map({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
[_ai]: [, __expectNonNull(input[_aI], `accountId`)],
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
};
export const se_ListAccountsCommand = async (input, context) => {
const b = rb(input, context);
const headers = map({}, isSerializableHeaderValue, {
[_xasbt]: input[_aT],
});
b.bp("/assignment/accounts");
const query = map({
[_nt]: [, input[_nT]],
[_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
};
export const se_LogoutCommand = async (input, context) => {
const b = rb(input, context);
const headers = map({}, isSerializableHeaderValue, {
[_xasbt]: input[_aT],
});
b.bp("/logout");
let body;
b.m("POST").h(headers).b(body);
return b.build();
};
export const de_GetRoleCredentialsCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
});
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
roleCredentials: _json,
});
Object.assign(contents, doc);
return contents;
};
export const de_ListAccountRolesCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
});
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
nextToken: __expectString,
roleList: _json,
});
Object.assign(contents, doc);
return contents;
};
export const de_ListAccountsCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
});
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
accountList: _json,
nextToken: __expectString,
});
Object.assign(contents, doc);
return contents;
};
export const de_LogoutCommand = async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents = map({
$metadata: deserializeMetadata(output),
});
await collectBody(output.body, context);
return contents;
};
const de_CommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseErrorBody(output.body, context),
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InvalidRequestException":
case "com.amazonaws.sso#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.sso#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "TooManyRequestsException":
case "com.amazonaws.sso#TooManyRequestsException":
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
case "UnauthorizedException":
case "com.amazonaws.sso#UnauthorizedException":
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode,
});
}
};
const throwDefaultError = withBaseException(__BaseException);
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
const contents = map({});
const data = parsedOutput.body;
const doc = take(data, {
message: __expectString,
});
Object.assign(contents, doc);
const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return __decorateServiceException(exception, parsedOutput.body);
};
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
const contents = map({});
const data = parsedOutput.body;
const doc = take(data, {
message: __expectString,
});
Object.assign(contents, doc);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return __decorateServiceException(exception, parsedOutput.body);
};
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
const contents = map({});
const data = parsedOutput.body;
const doc = take(data, {
message: __expectString,
});
Object.assign(contents, doc);
const exception = new TooManyRequestsException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return __decorateServiceException(exception, parsedOutput.body);
};
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
const contents = map({});
const data = parsedOutput.body;
const doc = take(data, {
message: __expectString,
});
Object.assign(contents, doc);
const exception = new UnauthorizedException({
$metadata: deserializeMetadata(parsedOutput),
...contents,
});
return __decorateServiceException(exception, parsedOutput.body);
};
const deserializeMetadata = (output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const _aI = "accountId";
const _aT = "accessToken";
const _ai = "account_id";
const _mR = "maxResults";
const _mr = "max_result";
const _nT = "nextToken";
const _nt = "next_token";
const _rN = "roleName";
const _rn = "role_name";
const _xasbt = "x-amz-sso_bearer_token";
@@ -0,0 +1,33 @@
import packageInfo from "../package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
import { invalidProvider } from "@smithy/invalid-dependency";
import { calculateBodyLength } from "@smithy/util-body-length-browser";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
export const getRuntimeConfig = (config) => {
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? invalidProvider("Region is missing"),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? Sha256,
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
};
};
@@ -0,0 +1,49 @@
import packageInfo from "../package.json";
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
import { Hash } from "@smithy/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
import { calculateBodyLength } from "@smithy/util-body-length-node";
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
export const getRuntimeConfig = (config) => {
emitWarningIfUnsupportedVersion(process.version);
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
awsCheckVersion(process.version);
const loaderConfig = {
profile: config?.profile,
logger: clientSharedValues.logger,
};
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ??
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
loadNodeConfig({
...NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
};
};
@@ -0,0 +1,11 @@
import { Sha256 } from "@aws-crypto/sha256-js";
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
export const getRuntimeConfig = (config) => {
const browserDefaults = getBrowserRuntimeConfig(config);
return {
...browserDefaults,
...config,
runtime: "react-native",
sha256: config?.sha256 ?? Sha256,
};
};
@@ -0,0 +1,36 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { NoAuthSigner } from "@smithy/core";
import { NoOpLogger } from "@smithy/smithy-client";
import { parseUrl } from "@smithy/url-parser";
import { fromBase64, toBase64 } from "@smithy/util-base64";
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
import { defaultSSOHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
export const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? fromBase64,
base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new NoAuthSigner(),
},
],
logger: config?.logger ?? new NoOpLogger(),
serviceId: config?.serviceId ?? "SSO",
urlParser: config?.urlParser ?? parseUrl,
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
utf8Encoder: config?.utf8Encoder ?? toUtf8,
};
};
@@ -0,0 +1,9 @@
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};
@@ -0,0 +1,53 @@
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
export interface SSO {
/**
* @see {@link GetRoleCredentialsCommand}
*/
getRoleCredentials(args: GetRoleCredentialsCommandInput, options?: __HttpHandlerOptions): Promise<GetRoleCredentialsCommandOutput>;
getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
/**
* @see {@link ListAccountRolesCommand}
*/
listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountRolesCommandOutput>;
listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
/**
* @see {@link ListAccountsCommand}
*/
listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountsCommandOutput>;
listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
/**
* @see {@link LogoutCommand}
*/
logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
logout(args: LogoutCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LogoutCommandOutput) => void): void;
}
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
* @public
*/
export declare class SSO extends SSOClient implements SSO {
}
@@ -0,0 +1,200 @@
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
export { __Client };
/**
* @public
*/
export type ServiceInputTypes = GetRoleCredentialsCommandInput | ListAccountRolesCommandInput | ListAccountsCommandInput | LogoutCommandInput;
/**
* @public
*/
export type ServiceOutputTypes = GetRoleCredentialsCommandOutput | ListAccountRolesCommandOutput | ListAccountsCommandOutput | LogoutCommandOutput;
/**
* @public
*/
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
/**
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
*/
requestHandler?: __HttpHandlerUserInput;
/**
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
* @internal
*/
sha256?: __ChecksumConstructor | __HashConstructor;
/**
* The function that will be used to convert strings into HTTP endpoints.
* @internal
*/
urlParser?: __UrlParser;
/**
* A function that can calculate the length of a request body.
* @internal
*/
bodyLengthChecker?: __BodyLengthCalculator;
/**
* A function that converts a stream into an array of bytes.
* @internal
*/
streamCollector?: __StreamCollector;
/**
* The function that will be used to convert a base64-encoded string to a byte array.
* @internal
*/
base64Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a base64-encoded string.
* @internal
*/
base64Encoder?: __Encoder;
/**
* The function that will be used to convert a UTF8-encoded string to a byte array.
* @internal
*/
utf8Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a UTF-8 encoded string.
* @internal
*/
utf8Encoder?: __Encoder;
/**
* The runtime environment.
* @internal
*/
runtime?: string;
/**
* Disable dynamically changing the endpoint of the client based on the hostPrefix
* trait of an operation.
*/
disableHostPrefix?: boolean;
/**
* Unique service identifier.
* @internal
*/
serviceId?: string;
/**
* Enables IPv6/IPv4 dualstack endpoint.
*/
useDualstackEndpoint?: boolean | __Provider<boolean>;
/**
* Enables FIPS compatible endpoints.
*/
useFipsEndpoint?: boolean | __Provider<boolean>;
/**
* The AWS region to which this client will send requests
*/
region?: string | __Provider<string>;
/**
* Setting a client profile is similar to setting a value for the
* AWS_PROFILE environment variable. Setting a profile on a client
* in code only affects the single client instance, unlike AWS_PROFILE.
*
* When set, and only for environments where an AWS configuration
* file exists, fields configurable by this file will be retrieved
* from the specified profile within that file.
* Conflicting code configuration and environment variables will
* still have higher priority.
*
* For client credential resolution that involves checking the AWS
* configuration file, the client's profile (this value) will be
* used unless a different profile is set in the credential
* provider options.
*
*/
profile?: string;
/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;
/**
* Value for how many times a request will be made at most in case of retry.
*/
maxAttempts?: number | __Provider<number>;
/**
* Specifies which retry algorithm to use.
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
*
*/
retryMode?: string | __Provider<string>;
/**
* Optional logger for logging debug/info/warn/error.
*/
logger?: __Logger;
/**
* Optional extensions
*/
extensions?: RuntimeExtension[];
/**
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
*/
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
}
/**
* @public
*/
export type SSOClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
/**
* @public
*
* The configuration interface of SSOClient class constructor that set the region, credentials and other options.
*/
export interface SSOClientConfig extends SSOClientConfigType {
}
/**
* @public
*/
export type SSOClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
/**
* @public
*
* The resolved configuration interface of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {
}
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
* @public
*/
export declare class SSOClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig> {
/**
* The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
readonly config: SSOClientResolvedConfig;
constructor(...[configuration]: __CheckOptionalClientConfig<SSOClientConfig>);
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy(): void;
}
@@ -0,0 +1,29 @@
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
import { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
/**
* @internal
*/
export interface HttpAuthExtensionConfiguration {
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
httpAuthSchemes(): HttpAuthScheme[];
setHttpAuthSchemeProvider(httpAuthSchemeProvider: SSOHttpAuthSchemeProvider): void;
httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider;
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
}
/**
* @internal
*/
export type HttpAuthRuntimeConfig = Partial<{
httpAuthSchemes: HttpAuthScheme[];
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
}>;
/**
* @internal
*/
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
/**
* @internal
*/
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
@@ -0,0 +1,75 @@
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
import { SSOClientResolvedConfig } from "../SSOClient";
/**
* @internal
*/
export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
region?: string;
}
/**
* @internal
*/
export interface SSOHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<SSOClientResolvedConfig, HandlerExecutionContext, SSOHttpAuthSchemeParameters, object> {
}
/**
* @internal
*/
export declare const defaultSSOHttpAuthSchemeParametersProvider: (config: SSOClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<SSOHttpAuthSchemeParameters>;
/**
* @internal
*/
export interface SSOHttpAuthSchemeProvider extends HttpAuthSchemeProvider<SSOHttpAuthSchemeParameters> {
}
/**
* @internal
*/
export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
/**
* @internal
*/
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
/**
* A comma-separated list of case-sensitive auth scheme names.
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
* @public
*/
authSchemePreference?: string[] | Provider<string[]>;
/**
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
* @internal
*/
httpAuthSchemes?: HttpAuthScheme[];
/**
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
* @internal
*/
httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider;
}
/**
* @internal
*/
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
/**
* A comma-separated list of case-sensitive auth scheme names.
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
* @public
*/
readonly authSchemePreference: Provider<string[]>;
/**
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
* @internal
*/
readonly httpAuthSchemes: HttpAuthScheme[];
/**
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
* @internal
*/
readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
}
/**
* @internal
*/
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
@@ -0,0 +1,95 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0";
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link GetRoleCredentialsCommand}.
*/
export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest {
}
/**
* @public
*
* The output of {@link GetRoleCredentialsCommand}.
*/
export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer {
}
declare const GetRoleCredentialsCommand_base: {
new (input: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <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 input = { // GetRoleCredentialsRequest
* roleName: "STRING_VALUE", // required
* accountId: "STRING_VALUE", // required
* accessToken: "STRING_VALUE", // required
* };
* const command = new GetRoleCredentialsCommand(input);
* const response = await client.send(command);
* // { // GetRoleCredentialsResponse
* // roleCredentials: { // RoleCredentials
* // accessKeyId: "STRING_VALUE",
* // secretAccessKey: "STRING_VALUE",
* // sessionToken: "STRING_VALUE",
* // expiration: Number("long"),
* // },
* // };
*
* ```
*
* @param GetRoleCredentialsCommandInput - {@link GetRoleCredentialsCommandInput}
* @returns {@link GetRoleCredentialsCommandOutput}
* @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.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: GetRoleCredentialsRequest;
output: GetRoleCredentialsResponse;
};
sdk: {
input: GetRoleCredentialsCommandInput;
output: GetRoleCredentialsCommandOutput;
};
};
}
@@ -0,0 +1,96 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { ListAccountRolesRequest, ListAccountRolesResponse } from "../models/models_0";
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ListAccountRolesCommand}.
*/
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {
}
/**
* @public
*
* The output of {@link ListAccountRolesCommand}.
*/
export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer {
}
declare const ListAccountRolesCommand_base: {
new (input: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <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 input = { // ListAccountRolesRequest
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* accessToken: "STRING_VALUE", // required
* accountId: "STRING_VALUE", // required
* };
* const command = new ListAccountRolesCommand(input);
* const response = await client.send(command);
* // { // ListAccountRolesResponse
* // nextToken: "STRING_VALUE",
* // roleList: [ // RoleListType
* // { // RoleInfo
* // roleName: "STRING_VALUE",
* // accountId: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param ListAccountRolesCommandInput - {@link ListAccountRolesCommandInput}
* @returns {@link ListAccountRolesCommandOutput}
* @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.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: ListAccountRolesRequest;
output: ListAccountRolesResponse;
};
sdk: {
input: ListAccountRolesCommandInput;
output: ListAccountRolesCommandOutput;
};
};
}
@@ -0,0 +1,98 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ListAccountsCommand}.
*/
export interface ListAccountsCommandInput extends ListAccountsRequest {
}
/**
* @public
*
* The output of {@link ListAccountsCommand}.
*/
export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer {
}
declare const ListAccountsCommand_base: {
new (input: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <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 input = { // ListAccountsRequest
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* accessToken: "STRING_VALUE", // required
* };
* const command = new ListAccountsCommand(input);
* const response = await client.send(command);
* // { // ListAccountsResponse
* // nextToken: "STRING_VALUE",
* // accountList: [ // AccountListType
* // { // AccountInfo
* // accountId: "STRING_VALUE",
* // accountName: "STRING_VALUE",
* // emailAddress: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param ListAccountsCommandInput - {@link ListAccountsCommandInput}
* @returns {@link ListAccountsCommandOutput}
* @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.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class ListAccountsCommand extends ListAccountsCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: ListAccountsRequest;
output: ListAccountsResponse;
};
sdk: {
input: ListAccountsCommandInput;
output: ListAccountsCommandOutput;
};
};
}
@@ -0,0 +1,95 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { LogoutRequest } from "../models/models_0";
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link LogoutCommand}.
*/
export interface LogoutCommandInput extends LogoutRequest {
}
/**
* @public
*
* The output of {@link LogoutCommand}.
*/
export interface LogoutCommandOutput extends __MetadataBearer {
}
declare const LogoutCommand_base: {
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <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 users 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 input = { // LogoutRequest
* accessToken: "STRING_VALUE", // required
* };
* const command = new LogoutCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param LogoutCommandInput - {@link LogoutCommandInput}
* @returns {@link LogoutCommandOutput}
* @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.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class LogoutCommand extends LogoutCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: LogoutRequest;
output: {};
};
sdk: {
input: LogoutCommandInput;
output: LogoutCommandOutput;
};
};
}
@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";
@@ -0,0 +1,38 @@
import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types";
/**
* @public
*/
export interface ClientInputEndpointParameters {
region?: string | undefined | Provider<string | undefined>;
useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
}
export type ClientResolvedEndpointParameters = Omit<ClientInputEndpointParameters, "endpoint"> & {
defaultSigningName: string;
};
export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientResolvedEndpointParameters;
export declare const commonParams: {
readonly UseFIPS: {
readonly type: "builtInParams";
readonly name: "useFipsEndpoint";
};
readonly Endpoint: {
readonly type: "builtInParams";
readonly name: "endpoint";
};
readonly Region: {
readonly type: "builtInParams";
readonly name: "region";
};
readonly UseDualStack: {
readonly type: "builtInParams";
readonly name: "useDualstackEndpoint";
};
};
export interface EndpointParameters extends __EndpointParameters {
Region?: string | undefined;
UseDualStack?: boolean | undefined;
UseFIPS?: boolean | undefined;
Endpoint?: string | undefined;
}
@@ -0,0 +1,5 @@
import { EndpointV2, Logger } from "@smithy/types";
import { EndpointParameters } from "./EndpointParameters";
export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: {
logger?: Logger;
}) => EndpointV2;
@@ -0,0 +1,2 @@
import { RuleSetObject } from "@smithy/types";
export declare const ruleSet: RuleSetObject;
@@ -0,0 +1,9 @@
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import { DefaultExtensionConfiguration } from "@smithy/types";
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
/**
* @internal
*/
export interface SSOExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
}
@@ -0,0 +1,29 @@
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
*
* @packageDocumentation
*/
export * from "./SSOClient";
export * from "./SSO";
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
export type { RuntimeExtension } from "./runtimeExtensions";
export type { SSOExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./pagination";
export * from "./models";
export { SSOServiceException } from "./models/SSOServiceException";
@@ -0,0 +1,14 @@
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
export type { __ServiceExceptionOptions };
export { __ServiceException };
/**
* @public
*
* Base exception class for all service exceptions from SSO service.
*/
export declare class SSOServiceException extends __ServiceException {
/**
* @internal
*/
constructor(options: __ServiceExceptionOptions);
}
@@ -0,0 +1 @@
export * from "./models_0";
@@ -0,0 +1,266 @@
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { SSOServiceException as __BaseException } from "./SSOServiceException";
/**
* <p>Provides information about your AWS account.</p>
* @public
*/
export interface AccountInfo {
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
* @public
*/
accountId?: string | undefined;
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
* @public
*/
accountName?: string | undefined;
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
* @public
*/
emailAddress?: string | undefined;
}
/**
* @public
*/
export interface GetRoleCredentialsRequest {
/**
* <p>The friendly name of the role that is assigned to the user.</p>
* @public
*/
roleName: string | undefined;
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
* @public
*/
accountId: string | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}
/**
* <p>Provides information about the role credentials that are assigned to the user.</p>
* @public
*/
export interface RoleCredentials {
/**
* <p>The identifier used for the temporary security credentials. For more information, see
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
accessKeyId?: string | undefined;
/**
* <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
secretAccessKey?: string | undefined;
/**
* <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
sessionToken?: string | undefined;
/**
* <p>The date on which temporary security credentials expire.</p>
* @public
*/
expiration?: number | undefined;
}
/**
* @public
*/
export interface GetRoleCredentialsResponse {
/**
* <p>The credentials for the role that is assigned to the user.</p>
* @public
*/
roleCredentials?: RoleCredentials | undefined;
}
/**
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
* @public
*/
export declare class InvalidRequestException extends __BaseException {
readonly name: "InvalidRequestException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
}
/**
* <p>The specified resource doesn't exist.</p>
* @public
*/
export declare class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
}
/**
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
* @public
*/
export declare class TooManyRequestsException extends __BaseException {
readonly name: "TooManyRequestsException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
}
/**
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
* @public
*/
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
}
/**
* @public
*/
export interface ListAccountRolesRequest {
/**
* <p>The page token from the previous response output when you request subsequent pages.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>The number of items that clients can request per page.</p>
* @public
*/
maxResults?: number | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
* @public
*/
accountId: string | undefined;
}
/**
* <p>Provides information about the role that is assigned to the user.</p>
* @public
*/
export interface RoleInfo {
/**
* <p>The friendly name of the role that is assigned to the user.</p>
* @public
*/
roleName?: string | undefined;
/**
* <p>The identifier of the AWS account assigned to the user.</p>
* @public
*/
accountId?: string | undefined;
}
/**
* @public
*/
export interface ListAccountRolesResponse {
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>A paginated response with the list of roles and the next token if more results are
* available.</p>
* @public
*/
roleList?: RoleInfo[] | undefined;
}
/**
* @public
*/
export interface ListAccountsRequest {
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous
* response output.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>This is the number of items clients can request per page.</p>
* @public
*/
maxResults?: number | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}
/**
* @public
*/
export interface ListAccountsResponse {
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>A paginated response with the list of account information and the next token if more
* results are available.</p>
* @public
*/
accountList?: AccountInfo[] | undefined;
}
/**
* @public
*/
export interface LogoutRequest {
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}
/**
* @internal
*/
export declare const GetRoleCredentialsRequestFilterSensitiveLog: (obj: GetRoleCredentialsRequest) => any;
/**
* @internal
*/
export declare const RoleCredentialsFilterSensitiveLog: (obj: RoleCredentials) => any;
/**
* @internal
*/
export declare const GetRoleCredentialsResponseFilterSensitiveLog: (obj: GetRoleCredentialsResponse) => any;
/**
* @internal
*/
export declare const ListAccountRolesRequestFilterSensitiveLog: (obj: ListAccountRolesRequest) => any;
/**
* @internal
*/
export declare const ListAccountsRequestFilterSensitiveLog: (obj: ListAccountsRequest) => any;
/**
* @internal
*/
export declare const LogoutRequestFilterSensitiveLog: (obj: LogoutRequest) => any;
@@ -0,0 +1,8 @@
import { PaginationConfiguration } from "@smithy/types";
import { SSOClient } from "../SSOClient";
/**
* @public
*/
export interface SSOPaginationConfiguration extends PaginationConfiguration {
client: SSOClient;
}
@@ -0,0 +1,7 @@
import { Paginator } from "@smithy/types";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
/**
* @public
*/
export declare const paginateListAccountRoles: (config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...rest: any[]) => Paginator<ListAccountRolesCommandOutput>;
@@ -0,0 +1,7 @@
import { Paginator } from "@smithy/types";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
/**
* @public
*/
export declare const paginateListAccounts: (config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...rest: any[]) => Paginator<ListAccountsCommandOutput>;
@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";
@@ -0,0 +1,38 @@
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "../commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand";
import { LogoutCommandInput, LogoutCommandOutput } from "../commands/LogoutCommand";
/**
* serializeAws_restJson1GetRoleCredentialsCommand
*/
export declare const se_GetRoleCredentialsCommand: (input: GetRoleCredentialsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* serializeAws_restJson1ListAccountRolesCommand
*/
export declare const se_ListAccountRolesCommand: (input: ListAccountRolesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* serializeAws_restJson1ListAccountsCommand
*/
export declare const se_ListAccountsCommand: (input: ListAccountsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* serializeAws_restJson1LogoutCommand
*/
export declare const se_LogoutCommand: (input: LogoutCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
/**
* deserializeAws_restJson1GetRoleCredentialsCommand
*/
export declare const de_GetRoleCredentialsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetRoleCredentialsCommandOutput>;
/**
* deserializeAws_restJson1ListAccountRolesCommand
*/
export declare const de_ListAccountRolesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAccountRolesCommandOutput>;
/**
* deserializeAws_restJson1ListAccountsCommand
*/
export declare const de_ListAccountsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAccountsCommandOutput>;
/**
* deserializeAws_restJson1LogoutCommand
*/
export declare const de_LogoutCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<LogoutCommandOutput>;
@@ -0,0 +1,57 @@
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
import { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<any>;
requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
apiVersion: string;
cacheMiddleware?: boolean | undefined;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,57 @@
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
import { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<string>;
requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
apiVersion: string;
cacheMiddleware?: boolean | undefined;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,56 @@
import { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
sha256: import("@smithy/types").HashConstructor;
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
apiVersion: string;
cacheMiddleware?: boolean;
urlParser: import("@smithy/types").UrlParser;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
streamCollector: import("@smithy/types").StreamCollector;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
region: string | import("@smithy/types").Provider<any>;
profile?: string;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
retryMode: string | import("@smithy/types").Provider<string>;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,32 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { NoAuthSigner } from "@smithy/core";
import { IdentityProviderConfig } from "@smithy/types";
import { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
apiVersion: string;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
disableHostPrefix: boolean;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
extensions: import("./runtimeExtensions").RuntimeExtension[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: NoAuthSigner;
})[];
logger: import("@smithy/types").Logger;
serviceId: string;
urlParser: import("@smithy/types").UrlParser;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
};
@@ -0,0 +1,17 @@
import { SSOExtensionConfiguration } from "./extensionConfiguration";
/**
* @public
*/
export interface RuntimeExtension {
configure(extensionConfiguration: SSOExtensionConfiguration): void;
}
/**
* @public
*/
export interface RuntimeExtensionsConfig {
extensions: RuntimeExtension[];
}
/**
* @internal
*/
export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;
@@ -0,0 +1,73 @@
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
import {
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
} from "./commands/GetRoleCredentialsCommand";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "./commands/ListAccountRolesCommand";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "./commands/ListAccountsCommand";
import {
LogoutCommandInput,
LogoutCommandOutput,
} from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
export interface SSO {
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
options?: __HttpHandlerOptions
): Promise<GetRoleCredentialsCommandOutput>;
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
): void;
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
): void;
listAccountRoles(
args: ListAccountRolesCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAccountRolesCommandOutput>;
listAccountRoles(
args: ListAccountRolesCommandInput,
cb: (err: any, data?: ListAccountRolesCommandOutput) => void
): void;
listAccountRoles(
args: ListAccountRolesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAccountRolesCommandOutput) => void
): void;
listAccounts(
args: ListAccountsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAccountsCommandOutput>;
listAccounts(
args: ListAccountsCommandInput,
cb: (err: any, data?: ListAccountsCommandOutput) => void
): void;
listAccounts(
args: ListAccountsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAccountsCommandOutput) => void
): void;
logout(
args: LogoutCommandInput,
options?: __HttpHandlerOptions
): Promise<LogoutCommandOutput>;
logout(
args: LogoutCommandInput,
cb: (err: any, data?: LogoutCommandOutput) => void
): void;
logout(
args: LogoutCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: LogoutCommandOutput) => void
): void;
}
export declare class SSO extends SSOClient implements SSO {}
@@ -0,0 +1,138 @@
import {
HostHeaderInputConfig,
HostHeaderResolvedConfig,
} from "@aws-sdk/middleware-host-header";
import {
UserAgentInputConfig,
UserAgentResolvedConfig,
} from "@aws-sdk/middleware-user-agent";
import {
RegionInputConfig,
RegionResolvedConfig,
} from "@smithy/config-resolver";
import {
EndpointInputConfig,
EndpointResolvedConfig,
} from "@smithy/middleware-endpoint";
import {
RetryInputConfig,
RetryResolvedConfig,
} from "@smithy/middleware-retry";
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
import {
Client as __Client,
DefaultsMode as __DefaultsMode,
SmithyConfiguration as __SmithyConfiguration,
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
} from "@smithy/smithy-client";
import {
BodyLengthCalculator as __BodyLengthCalculator,
CheckOptionalClientConfig as __CheckOptionalClientConfig,
ChecksumConstructor as __ChecksumConstructor,
Decoder as __Decoder,
Encoder as __Encoder,
HashConstructor as __HashConstructor,
HttpHandlerOptions as __HttpHandlerOptions,
Logger as __Logger,
Provider as __Provider,
Provider,
StreamCollector as __StreamCollector,
UrlParser as __UrlParser,
UserAgent as __UserAgent,
} from "@smithy/types";
import {
HttpAuthSchemeInputConfig,
HttpAuthSchemeResolvedConfig,
} from "./auth/httpAuthSchemeProvider";
import {
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
} from "./commands/GetRoleCredentialsCommand";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "./commands/ListAccountRolesCommand";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "./commands/ListAccountsCommand";
import {
LogoutCommandInput,
LogoutCommandOutput,
} from "./commands/LogoutCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
EndpointParameters,
} from "./endpoint/EndpointParameters";
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
export { __Client };
export type ServiceInputTypes =
| GetRoleCredentialsCommandInput
| ListAccountRolesCommandInput
| ListAccountsCommandInput
| LogoutCommandInput;
export type ServiceOutputTypes =
| GetRoleCredentialsCommandOutput
| ListAccountRolesCommandOutput
| ListAccountsCommandOutput
| LogoutCommandOutput;
export interface ClientDefaults
extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
requestHandler?: __HttpHandlerUserInput;
sha256?: __ChecksumConstructor | __HashConstructor;
urlParser?: __UrlParser;
bodyLengthChecker?: __BodyLengthCalculator;
streamCollector?: __StreamCollector;
base64Decoder?: __Decoder;
base64Encoder?: __Encoder;
utf8Decoder?: __Decoder;
utf8Encoder?: __Encoder;
runtime?: string;
disableHostPrefix?: boolean;
serviceId?: string;
useDualstackEndpoint?: boolean | __Provider<boolean>;
useFipsEndpoint?: boolean | __Provider<boolean>;
region?: string | __Provider<string>;
profile?: string;
defaultUserAgentProvider?: Provider<__UserAgent>;
maxAttempts?: number | __Provider<number>;
retryMode?: string | __Provider<string>;
logger?: __Logger;
extensions?: RuntimeExtension[];
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
}
export type SSOClientConfigType = Partial<
__SmithyConfiguration<__HttpHandlerOptions>
> &
ClientDefaults &
UserAgentInputConfig &
RetryInputConfig &
RegionInputConfig &
HostHeaderInputConfig &
EndpointInputConfig<EndpointParameters> &
HttpAuthSchemeInputConfig &
ClientInputEndpointParameters;
export interface SSOClientConfig extends SSOClientConfigType {}
export type SSOClientResolvedConfigType =
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RuntimeExtensionsConfig &
UserAgentResolvedConfig &
RetryResolvedConfig &
RegionResolvedConfig &
HostHeaderResolvedConfig &
EndpointResolvedConfig<EndpointParameters> &
HttpAuthSchemeResolvedConfig &
ClientResolvedEndpointParameters;
export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {}
export declare class SSOClient extends __Client<
__HttpHandlerOptions,
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig
> {
readonly config: SSOClientResolvedConfig;
constructor(...[configuration]: __CheckOptionalClientConfig<SSOClientConfig>);
destroy(): void;
}
@@ -0,0 +1,32 @@
import {
AwsCredentialIdentity,
AwsCredentialIdentityProvider,
HttpAuthScheme,
} from "@smithy/types";
import { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
export interface HttpAuthExtensionConfiguration {
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
httpAuthSchemes(): HttpAuthScheme[];
setHttpAuthSchemeProvider(
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider
): void;
httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider;
setCredentials(
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider
): void;
credentials():
| AwsCredentialIdentity
| AwsCredentialIdentityProvider
| undefined;
}
export type HttpAuthRuntimeConfig = Partial<{
httpAuthSchemes: HttpAuthScheme[];
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
}>;
export declare const getHttpAuthExtensionConfiguration: (
runtimeConfig: HttpAuthRuntimeConfig
) => HttpAuthExtensionConfiguration;
export declare const resolveHttpAuthRuntimeConfig: (
config: HttpAuthExtensionConfiguration
) => HttpAuthRuntimeConfig;
@@ -0,0 +1,46 @@
import {
AwsSdkSigV4AuthInputConfig,
AwsSdkSigV4AuthResolvedConfig,
AwsSdkSigV4PreviouslyResolved,
} from "@aws-sdk/core";
import {
HandlerExecutionContext,
HttpAuthScheme,
HttpAuthSchemeParameters,
HttpAuthSchemeParametersProvider,
HttpAuthSchemeProvider,
Provider,
} from "@smithy/types";
import { SSOClientResolvedConfig } from "../SSOClient";
export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
region?: string;
}
export interface SSOHttpAuthSchemeParametersProvider
extends HttpAuthSchemeParametersProvider<
SSOClientResolvedConfig,
HandlerExecutionContext,
SSOHttpAuthSchemeParameters,
object
> {}
export declare const defaultSSOHttpAuthSchemeParametersProvider: (
config: SSOClientResolvedConfig,
context: HandlerExecutionContext,
input: object
) => Promise<SSOHttpAuthSchemeParameters>;
export interface SSOHttpAuthSchemeProvider
extends HttpAuthSchemeProvider<SSOHttpAuthSchemeParameters> {}
export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
authSchemePreference?: string[] | Provider<string[]>;
httpAuthSchemes?: HttpAuthScheme[];
httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider;
}
export interface HttpAuthSchemeResolvedConfig
extends AwsSdkSigV4AuthResolvedConfig {
readonly authSchemePreference: Provider<string[]>;
readonly httpAuthSchemes: HttpAuthScheme[];
readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
}
export declare const resolveHttpAuthSchemeConfig: <T>(
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
) => T & HttpAuthSchemeResolvedConfig;
@@ -0,0 +1,51 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import {
GetRoleCredentialsRequest,
GetRoleCredentialsResponse,
} from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface GetRoleCredentialsCommandInput
extends GetRoleCredentialsRequest {}
export interface GetRoleCredentialsCommandOutput
extends GetRoleCredentialsResponse,
__MetadataBearer {}
declare const GetRoleCredentialsCommand_base: {
new (
input: GetRoleCredentialsCommandInput
): import("@smithy/smithy-client").CommandImpl<
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: GetRoleCredentialsCommandInput
): import("@smithy/smithy-client").CommandImpl<
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base {
protected static __types: {
api: {
input: GetRoleCredentialsRequest;
output: GetRoleCredentialsResponse;
};
sdk: {
input: GetRoleCredentialsCommandInput;
output: GetRoleCredentialsCommandOutput;
};
};
}
@@ -0,0 +1,50 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import {
ListAccountRolesRequest,
ListAccountRolesResponse,
} from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {}
export interface ListAccountRolesCommandOutput
extends ListAccountRolesResponse,
__MetadataBearer {}
declare const ListAccountRolesCommand_base: {
new (
input: ListAccountRolesCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: ListAccountRolesCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base {
protected static __types: {
api: {
input: ListAccountRolesRequest;
output: ListAccountRolesResponse;
};
sdk: {
input: ListAccountRolesCommandInput;
output: ListAccountRolesCommandOutput;
};
};
}
@@ -0,0 +1,47 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface ListAccountsCommandInput extends ListAccountsRequest {}
export interface ListAccountsCommandOutput
extends ListAccountsResponse,
__MetadataBearer {}
declare const ListAccountsCommand_base: {
new (
input: ListAccountsCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountsCommandInput,
ListAccountsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: ListAccountsCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountsCommandInput,
ListAccountsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class ListAccountsCommand extends ListAccountsCommand_base {
protected static __types: {
api: {
input: ListAccountsRequest;
output: ListAccountsResponse;
};
sdk: {
input: ListAccountsCommandInput;
output: ListAccountsCommandOutput;
};
};
}
@@ -0,0 +1,41 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { LogoutRequest } from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface LogoutCommandInput extends LogoutRequest {}
export interface LogoutCommandOutput extends __MetadataBearer {}
declare const LogoutCommand_base: {
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<
LogoutCommandInput,
LogoutCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<
LogoutCommandInput,
LogoutCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class LogoutCommand extends LogoutCommand_base {
protected static __types: {
api: {
input: LogoutRequest;
output: {};
};
sdk: {
input: LogoutCommandInput;
output: LogoutCommandOutput;
};
};
}
@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";
@@ -0,0 +1,51 @@
import {
Endpoint,
EndpointParameters as __EndpointParameters,
EndpointV2,
Provider,
} from "@smithy/types";
export interface ClientInputEndpointParameters {
region?: string | undefined | Provider<string | undefined>;
useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
endpoint?:
| string
| Provider<string>
| Endpoint
| Provider<Endpoint>
| EndpointV2
| Provider<EndpointV2>;
}
export type ClientResolvedEndpointParameters = Pick<
ClientInputEndpointParameters,
Exclude<keyof ClientInputEndpointParameters, "endpoint">
> & {
defaultSigningName: string;
};
export declare const resolveClientEndpointParameters: <T>(
options: T & ClientInputEndpointParameters
) => T & ClientResolvedEndpointParameters;
export declare const commonParams: {
readonly UseFIPS: {
readonly type: "builtInParams";
readonly name: "useFipsEndpoint";
};
readonly Endpoint: {
readonly type: "builtInParams";
readonly name: "endpoint";
};
readonly Region: {
readonly type: "builtInParams";
readonly name: "region";
};
readonly UseDualStack: {
readonly type: "builtInParams";
readonly name: "useDualstackEndpoint";
};
};
export interface EndpointParameters extends __EndpointParameters {
Region?: string | undefined;
UseDualStack?: boolean | undefined;
UseFIPS?: boolean | undefined;
Endpoint?: string | undefined;
}
@@ -0,0 +1,8 @@
import { EndpointV2, Logger } from "@smithy/types";
import { EndpointParameters } from "./EndpointParameters";
export declare const defaultEndpointResolver: (
endpointParams: EndpointParameters,
context?: {
logger?: Logger;
}
) => EndpointV2;
@@ -0,0 +1,2 @@
import { RuleSetObject } from "@smithy/types";
export declare const ruleSet: RuleSetObject;
@@ -0,0 +1,9 @@
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import { DefaultExtensionConfiguration } from "@smithy/types";
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
export interface SSOExtensionConfiguration
extends HttpHandlerExtensionConfiguration,
DefaultExtensionConfiguration,
AwsRegionExtensionConfiguration,
HttpAuthExtensionConfiguration {}
@@ -0,0 +1,9 @@
export * from "./SSOClient";
export * from "./SSO";
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
export { RuntimeExtension } from "./runtimeExtensions";
export { SSOExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./pagination";
export * from "./models";
export { SSOServiceException } from "./models/SSOServiceException";
@@ -0,0 +1,9 @@
import {
ServiceException as __ServiceException,
ServiceExceptionOptions as __ServiceExceptionOptions,
} from "@smithy/smithy-client";
export { __ServiceExceptionOptions };
export { __ServiceException };
export declare class SSOServiceException extends __ServiceException {
constructor(options: __ServiceExceptionOptions);
}
@@ -0,0 +1 @@
export * from "./models_0";
@@ -0,0 +1,93 @@
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { SSOServiceException as __BaseException } from "./SSOServiceException";
export interface AccountInfo {
accountId?: string | undefined;
accountName?: string | undefined;
emailAddress?: string | undefined;
}
export interface GetRoleCredentialsRequest {
roleName: string | undefined;
accountId: string | undefined;
accessToken: string | undefined;
}
export interface RoleCredentials {
accessKeyId?: string | undefined;
secretAccessKey?: string | undefined;
sessionToken?: string | undefined;
expiration?: number | undefined;
}
export interface GetRoleCredentialsResponse {
roleCredentials?: RoleCredentials | undefined;
}
export declare class InvalidRequestException extends __BaseException {
readonly name: "InvalidRequestException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<InvalidRequestException, __BaseException>
);
}
export declare class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
);
}
export declare class TooManyRequestsException extends __BaseException {
readonly name: "TooManyRequestsException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>
);
}
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<UnauthorizedException, __BaseException>
);
}
export interface ListAccountRolesRequest {
nextToken?: string | undefined;
maxResults?: number | undefined;
accessToken: string | undefined;
accountId: string | undefined;
}
export interface RoleInfo {
roleName?: string | undefined;
accountId?: string | undefined;
}
export interface ListAccountRolesResponse {
nextToken?: string | undefined;
roleList?: RoleInfo[] | undefined;
}
export interface ListAccountsRequest {
nextToken?: string | undefined;
maxResults?: number | undefined;
accessToken: string | undefined;
}
export interface ListAccountsResponse {
nextToken?: string | undefined;
accountList?: AccountInfo[] | undefined;
}
export interface LogoutRequest {
accessToken: string | undefined;
}
export declare const GetRoleCredentialsRequestFilterSensitiveLog: (
obj: GetRoleCredentialsRequest
) => any;
export declare const RoleCredentialsFilterSensitiveLog: (
obj: RoleCredentials
) => any;
export declare const GetRoleCredentialsResponseFilterSensitiveLog: (
obj: GetRoleCredentialsResponse
) => any;
export declare const ListAccountRolesRequestFilterSensitiveLog: (
obj: ListAccountRolesRequest
) => any;
export declare const ListAccountsRequestFilterSensitiveLog: (
obj: ListAccountsRequest
) => any;
export declare const LogoutRequestFilterSensitiveLog: (
obj: LogoutRequest
) => any;
@@ -0,0 +1,5 @@
import { PaginationConfiguration } from "@smithy/types";
import { SSOClient } from "../SSOClient";
export interface SSOPaginationConfiguration extends PaginationConfiguration {
client: SSOClient;
}
@@ -0,0 +1,11 @@
import { Paginator } from "@smithy/types";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "../commands/ListAccountRolesCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
export declare const paginateListAccountRoles: (
config: SSOPaginationConfiguration,
input: ListAccountRolesCommandInput,
...rest: any[]
) => Paginator<ListAccountRolesCommandOutput>;
@@ -0,0 +1,11 @@
import { Paginator } from "@smithy/types";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "../commands/ListAccountsCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
export declare const paginateListAccounts: (
config: SSOPaginationConfiguration,
input: ListAccountsCommandInput,
...rest: any[]
) => Paginator<ListAccountsCommandOutput>;
@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";
@@ -0,0 +1,53 @@
import {
HttpRequest as __HttpRequest,
HttpResponse as __HttpResponse,
} from "@smithy/protocol-http";
import { SerdeContext as __SerdeContext } from "@smithy/types";
import {
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
} from "../commands/GetRoleCredentialsCommand";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "../commands/ListAccountRolesCommand";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "../commands/ListAccountsCommand";
import {
LogoutCommandInput,
LogoutCommandOutput,
} from "../commands/LogoutCommand";
export declare const se_GetRoleCredentialsCommand: (
input: GetRoleCredentialsCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const se_ListAccountRolesCommand: (
input: ListAccountRolesCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const se_ListAccountsCommand: (
input: ListAccountsCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const se_LogoutCommand: (
input: LogoutCommandInput,
context: __SerdeContext
) => Promise<__HttpRequest>;
export declare const de_GetRoleCredentialsCommand: (
output: __HttpResponse,
context: __SerdeContext
) => Promise<GetRoleCredentialsCommandOutput>;
export declare const de_ListAccountRolesCommand: (
output: __HttpResponse,
context: __SerdeContext
) => Promise<ListAccountRolesCommandOutput>;
export declare const de_ListAccountsCommand: (
output: __HttpResponse,
context: __SerdeContext
) => Promise<ListAccountsCommandOutput>;
export declare const de_LogoutCommand: (
output: __HttpResponse,
context: __SerdeContext
) => Promise<LogoutCommandOutput>;
@@ -0,0 +1,112 @@
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<
import("@smithy/smithy-client").ResolvedDefaultsMode
>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<any>;
requestHandler:
| import("@smithy/protocol-http").HttpHandler<any>
| RequestHandler;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
apiVersion: string;
cacheMiddleware?: boolean | undefined;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?:
| string
| undefined
| import("@smithy/types").Provider<string | undefined>;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,107 @@
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<
import("@smithy/smithy-client").ResolvedDefaultsMode
>;
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<string>;
requestHandler:
| RequestHandler
| import("@smithy/protocol-http").HttpHandler<any>;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
apiVersion: string;
cacheMiddleware?: boolean | undefined;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,116 @@
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
sha256: import("@smithy/types").HashConstructor;
requestHandler:
| import("@smithy/types").NodeHttpHandlerOptions
| import("@smithy/types").FetchHttpHandlerOptions
| Record<string, unknown>
| import("@smithy/protocol-http").HttpHandler<any>
| import("@smithy/fetch-http-handler").FetchHttpHandler;
apiVersion: string;
cacheMiddleware?: boolean;
urlParser: import("@smithy/types").UrlParser;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
streamCollector: import("@smithy/types").StreamCollector;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
region: string | import("@smithy/types").Provider<any>;
profile?: string;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
retryMode: string | import("@smithy/types").Provider<string>;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
defaultsMode:
| import("@smithy/smithy-client").DefaultsMode
| import("@smithy/types").Provider<
import("@smithy/smithy-client").DefaultsMode
>;
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?:
| string
| undefined
| import("@smithy/types").Provider<string | undefined>;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};
@@ -0,0 +1,49 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { NoAuthSigner } from "@smithy/core";
import { IdentityProviderConfig } from "@smithy/types";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
apiVersion: string;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
disableHostPrefix: boolean;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
extensions: import("./runtimeExtensions").RuntimeExtension[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: NoAuthSigner;
}
)[];
logger: import("@smithy/types").Logger;
serviceId: string;
urlParser: import("@smithy/types").UrlParser;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
};
@@ -0,0 +1,11 @@
import { SSOExtensionConfiguration } from "./extensionConfiguration";
export interface RuntimeExtension {
configure(extensionConfiguration: SSOExtensionConfiguration): void;
}
export interface RuntimeExtensionsConfig {
extensions: RuntimeExtension[];
}
export declare const resolveRuntimeExtensions: (
runtimeConfig: any,
extensions: RuntimeExtension[]
) => any;
+98
View File
@@ -0,0 +1,98 @@
{
"name": "@aws-sdk/client-sso",
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
"version": "3.840.0",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "node ../../scripts/compilation/inline client-sso",
"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
"@aws-sdk/core": "3.840.0",
"@aws-sdk/middleware-host-header": "3.840.0",
"@aws-sdk/middleware-logger": "3.840.0",
"@aws-sdk/middleware-recursion-detection": "3.840.0",
"@aws-sdk/middleware-user-agent": "3.840.0",
"@aws-sdk/region-config-resolver": "3.840.0",
"@aws-sdk/types": "3.840.0",
"@aws-sdk/util-endpoints": "3.840.0",
"@aws-sdk/util-user-agent-browser": "3.840.0",
"@aws-sdk/util-user-agent-node": "3.840.0",
"@smithy/config-resolver": "^4.1.4",
"@smithy/core": "^3.6.0",
"@smithy/fetch-http-handler": "^5.0.4",
"@smithy/hash-node": "^4.0.4",
"@smithy/invalid-dependency": "^4.0.4",
"@smithy/middleware-content-length": "^4.0.4",
"@smithy/middleware-endpoint": "^4.1.13",
"@smithy/middleware-retry": "^4.1.14",
"@smithy/middleware-serde": "^4.0.8",
"@smithy/middleware-stack": "^4.0.4",
"@smithy/node-config-provider": "^4.1.3",
"@smithy/node-http-handler": "^4.0.6",
"@smithy/protocol-http": "^5.1.2",
"@smithy/smithy-client": "^4.4.5",
"@smithy/types": "^4.3.1",
"@smithy/url-parser": "^4.0.4",
"@smithy/util-base64": "^4.0.0",
"@smithy/util-body-length-browser": "^4.0.0",
"@smithy/util-body-length-node": "^4.0.0",
"@smithy/util-defaults-mode-browser": "^4.0.21",
"@smithy/util-defaults-mode-node": "^4.0.21",
"@smithy/util-endpoints": "^3.0.6",
"@smithy/util-middleware": "^4.0.4",
"@smithy/util-retry": "^4.0.6",
"@smithy/util-utf8": "^4.0.0",
"tslib": "^2.6.2"
},
"devDependencies": {
"@tsconfig/node18": "18.2.4",
"@types/node": "^18.19.69",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"rimraf": "3.0.2",
"typescript": "~5.8.3"
},
"engines": {
"node": ">=18.0.0"
},
"typesVersions": {
"<4.0": {
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
"files": [
"dist-*/**"
],
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"browser": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
},
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
},
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-js-v3.git",
"directory": "clients/client-sso"
}
}