working rss feed to nostr publish
This commit is contained in:
+201
@@ -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
@@ -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 the 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/clients/client-sso/classes/getrolecredentialscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/getrolecredentialscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/getrolecredentialscommandoutput.html)
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListAccountRoles
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/classes/listaccountrolescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/listaccountrolescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/listaccountrolescommandoutput.html)
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListAccounts
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/classes/listaccountscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/listaccountscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/listaccountscommandoutput.html)
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
Logout
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/classes/logoutcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/logoutcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sso/interfaces/logoutcommandoutput.html)
|
||||
|
||||
</details>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SSO = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const GetRoleCredentialsCommand_1 = require("./commands/GetRoleCredentialsCommand");
|
||||
const ListAccountRolesCommand_1 = require("./commands/ListAccountRolesCommand");
|
||||
const ListAccountsCommand_1 = require("./commands/ListAccountsCommand");
|
||||
const LogoutCommand_1 = require("./commands/LogoutCommand");
|
||||
const SSOClient_1 = require("./SSOClient");
|
||||
const commands = {
|
||||
GetRoleCredentialsCommand: GetRoleCredentialsCommand_1.GetRoleCredentialsCommand,
|
||||
ListAccountRolesCommand: ListAccountRolesCommand_1.ListAccountRolesCommand,
|
||||
ListAccountsCommand: ListAccountsCommand_1.ListAccountsCommand,
|
||||
LogoutCommand: LogoutCommand_1.LogoutCommand,
|
||||
};
|
||||
class SSO extends SSOClient_1.SSOClient {
|
||||
}
|
||||
exports.SSO = SSO;
|
||||
(0, smithy_client_1.createAggregatedClient)(commands, SSO);
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SSOClient = exports.__Client = void 0;
|
||||
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
||||
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
||||
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
|
||||
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
||||
const config_resolver_1 = require("@smithy/config-resolver");
|
||||
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_retry_1 = require("@smithy/middleware-retry");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
||||
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
||||
const runtimeConfig_1 = require("./runtimeConfig");
|
||||
const runtimeExtensions_1 = require("./runtimeExtensions");
|
||||
class SSOClient extends smithy_client_1.Client {
|
||||
constructor(...[configuration]) {
|
||||
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
||||
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
||||
const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
|
||||
const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
|
||||
const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
|
||||
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
||||
const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);
|
||||
const _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []);
|
||||
super(_config_7);
|
||||
this.config = _config_7;
|
||||
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
||||
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
||||
}
|
||||
destroy() {
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
exports.SSOClient = SSOClient;
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetRoleCredentialsCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
||||
class GetRoleCredentialsCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetRoleCredentialsCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "GetRoleCredentialsCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "GetRoleCredentials",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_restJson1_1.se_GetRoleCredentialsCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_restJson1_1.de_GetRoleCredentialsCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ListAccountRolesCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
||||
class ListAccountRolesCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountRolesCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "ListAccountRolesCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "ListAccountRoles",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_restJson1_1.se_ListAccountRolesCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_restJson1_1.de_ListAccountRolesCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.ListAccountRolesCommand = ListAccountRolesCommand;
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ListAccountsCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
||||
class ListAccountsCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountsCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "ListAccountsCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "ListAccounts",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_restJson1_1.se_ListAccountsCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_restJson1_1.de_ListAccountsCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.ListAccountsCommand = ListAccountsCommand;
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LogoutCommand = exports.$Command = void 0;
|
||||
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
||||
const middleware_serde_1 = require("@smithy/middleware-serde");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
||||
const types_1 = require("@smithy/types");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
||||
class LogoutCommand extends smithy_client_1.Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, LogoutCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "LogoutCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[types_1.SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "Logout",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return (0, Aws_restJson1_1.se_LogoutCommand)(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return (0, Aws_restJson1_1.de_LogoutCommand)(output, context);
|
||||
}
|
||||
}
|
||||
exports.LogoutCommand = LogoutCommand;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./GetRoleCredentialsCommand"), exports);
|
||||
tslib_1.__exportStar(require("./ListAccountRolesCommand"), exports);
|
||||
tslib_1.__exportStar(require("./ListAccountsCommand"), exports);
|
||||
tslib_1.__exportStar(require("./LogoutCommand"), exports);
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveClientEndpointParameters = void 0;
|
||||
const resolveClientEndpointParameters = (options) => {
|
||||
return {
|
||||
...options,
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
defaultSigningName: "awsssoportal",
|
||||
};
|
||||
};
|
||||
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.defaultEndpointResolver = void 0;
|
||||
const util_endpoints_1 = require("@smithy/util-endpoints");
|
||||
const ruleset_1 = require("./ruleset");
|
||||
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
});
|
||||
};
|
||||
exports.defaultEndpointResolver = defaultEndpointResolver;
|
||||
+7
@@ -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;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SSOServiceException = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./SSOClient"), exports);
|
||||
tslib_1.__exportStar(require("./SSO"), exports);
|
||||
tslib_1.__exportStar(require("./commands"), exports);
|
||||
tslib_1.__exportStar(require("./pagination"), exports);
|
||||
tslib_1.__exportStar(require("./models"), exports);
|
||||
require("@aws-sdk/util-endpoints");
|
||||
var SSOServiceException_1 = require("./models/SSOServiceException");
|
||||
Object.defineProperty(exports, "SSOServiceException", { enumerable: true, get: function () { return SSOServiceException_1.SSOServiceException; } });
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SSOServiceException = exports.__ServiceException = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
||||
class SSOServiceException extends smithy_client_1.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, SSOServiceException.prototype);
|
||||
}
|
||||
}
|
||||
exports.SSOServiceException = SSOServiceException;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./models_0"), exports);
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const SSOServiceException_1 = require("./SSOServiceException");
|
||||
class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidRequestException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "InvalidRequestException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
||||
}
|
||||
}
|
||||
exports.InvalidRequestException = InvalidRequestException;
|
||||
class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ResourceNotFoundException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "ResourceNotFoundException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
||||
}
|
||||
}
|
||||
exports.ResourceNotFoundException = ResourceNotFoundException;
|
||||
class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "TooManyRequestsException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "TooManyRequestsException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
||||
}
|
||||
}
|
||||
exports.TooManyRequestsException = TooManyRequestsException;
|
||||
class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "UnauthorizedException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "UnauthorizedException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
||||
}
|
||||
}
|
||||
exports.UnauthorizedException = UnauthorizedException;
|
||||
const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.GetRoleCredentialsRequestFilterSensitiveLog = GetRoleCredentialsRequestFilterSensitiveLog;
|
||||
const RoleCredentialsFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }),
|
||||
...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.RoleCredentialsFilterSensitiveLog = RoleCredentialsFilterSensitiveLog;
|
||||
const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.roleCredentials && { roleCredentials: (0, exports.RoleCredentialsFilterSensitiveLog)(obj.roleCredentials) }),
|
||||
});
|
||||
exports.GetRoleCredentialsResponseFilterSensitiveLog = GetRoleCredentialsResponseFilterSensitiveLog;
|
||||
const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog;
|
||||
const ListAccountsRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog;
|
||||
const LogoutRequestFilterSensitiveLog = (obj) => ({
|
||||
...obj,
|
||||
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
||||
});
|
||||
exports.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
Generated
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.paginateListAccountRoles = void 0;
|
||||
const ListAccountRolesCommand_1 = require("../commands/ListAccountRolesCommand");
|
||||
const SSOClient_1 = require("../SSOClient");
|
||||
const makePagedClientRequest = async (client, input, ...args) => {
|
||||
return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args);
|
||||
};
|
||||
async function* paginateListAccountRoles(config, input, ...additionalArguments) {
|
||||
let token = config.startingToken || undefined;
|
||||
let hasNext = true;
|
||||
let page;
|
||||
while (hasNext) {
|
||||
input.nextToken = token;
|
||||
input["maxResults"] = config.pageSize;
|
||||
if (config.client instanceof SSOClient_1.SSOClient) {
|
||||
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
||||
}
|
||||
else {
|
||||
throw new Error("Invalid client, expected SSO | SSOClient");
|
||||
}
|
||||
yield page;
|
||||
const prevToken = token;
|
||||
token = page.nextToken;
|
||||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
exports.paginateListAccountRoles = paginateListAccountRoles;
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.paginateListAccounts = void 0;
|
||||
const ListAccountsCommand_1 = require("../commands/ListAccountsCommand");
|
||||
const SSOClient_1 = require("../SSOClient");
|
||||
const makePagedClientRequest = async (client, input, ...args) => {
|
||||
return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args);
|
||||
};
|
||||
async function* paginateListAccounts(config, input, ...additionalArguments) {
|
||||
let token = config.startingToken || undefined;
|
||||
let hasNext = true;
|
||||
let page;
|
||||
while (hasNext) {
|
||||
input.nextToken = token;
|
||||
input["maxResults"] = config.pageSize;
|
||||
if (config.client instanceof SSOClient_1.SSOClient) {
|
||||
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
||||
}
|
||||
else {
|
||||
throw new Error("Invalid client, expected SSO | SSOClient");
|
||||
}
|
||||
yield page;
|
||||
const prevToken = token;
|
||||
token = page.nextToken;
|
||||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
exports.paginateListAccounts = paginateListAccounts;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./Interfaces"), exports);
|
||||
tslib_1.__exportStar(require("./ListAccountRolesPaginator"), exports);
|
||||
tslib_1.__exportStar(require("./ListAccountsPaginator"), exports);
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.de_LogoutCommand = exports.de_ListAccountsCommand = exports.de_ListAccountRolesCommand = exports.de_GetRoleCredentialsCommand = exports.se_LogoutCommand = exports.se_ListAccountsCommand = exports.se_ListAccountRolesCommand = exports.se_GetRoleCredentialsCommand = void 0;
|
||||
const protocol_http_1 = require("@smithy/protocol-http");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const models_0_1 = require("../models/models_0");
|
||||
const SSOServiceException_1 = require("../models/SSOServiceException");
|
||||
const se_GetRoleCredentialsCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials";
|
||||
const query = (0, smithy_client_1.map)({
|
||||
role_name: [, (0, smithy_client_1.expectNonNull)(input.roleName, `roleName`)],
|
||||
account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)],
|
||||
});
|
||||
let body;
|
||||
return new protocol_http_1.HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
exports.se_GetRoleCredentialsCommand = se_GetRoleCredentialsCommand;
|
||||
const se_ListAccountRolesCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles";
|
||||
const query = (0, smithy_client_1.map)({
|
||||
next_token: [, input.nextToken],
|
||||
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
||||
account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)],
|
||||
});
|
||||
let body;
|
||||
return new protocol_http_1.HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
exports.se_ListAccountRolesCommand = se_ListAccountRolesCommand;
|
||||
const se_ListAccountsCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts";
|
||||
const query = (0, smithy_client_1.map)({
|
||||
next_token: [, input.nextToken],
|
||||
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
||||
});
|
||||
let body;
|
||||
return new protocol_http_1.HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
exports.se_ListAccountsCommand = se_ListAccountsCommand;
|
||||
const se_LogoutCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logout";
|
||||
let body;
|
||||
return new protocol_http_1.HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "POST",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
body,
|
||||
});
|
||||
};
|
||||
exports.se_LogoutCommand = se_LogoutCommand;
|
||||
const de_GetRoleCredentialsCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_GetRoleCredentialsCommandError(output, context);
|
||||
}
|
||||
const contents = (0, smithy_client_1.map)({
|
||||
$metadata: deserializeMetadata(output),
|
||||
});
|
||||
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
roleCredentials: smithy_client_1._json,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
return contents;
|
||||
};
|
||||
exports.de_GetRoleCredentialsCommand = de_GetRoleCredentialsCommand;
|
||||
const de_GetRoleCredentialsCommandError = 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 de_ListAccountRolesCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_ListAccountRolesCommandError(output, context);
|
||||
}
|
||||
const contents = (0, smithy_client_1.map)({
|
||||
$metadata: deserializeMetadata(output),
|
||||
});
|
||||
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
nextToken: smithy_client_1.expectString,
|
||||
roleList: smithy_client_1._json,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
return contents;
|
||||
};
|
||||
exports.de_ListAccountRolesCommand = de_ListAccountRolesCommand;
|
||||
const de_ListAccountRolesCommandError = 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 de_ListAccountsCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_ListAccountsCommandError(output, context);
|
||||
}
|
||||
const contents = (0, smithy_client_1.map)({
|
||||
$metadata: deserializeMetadata(output),
|
||||
});
|
||||
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
accountList: smithy_client_1._json,
|
||||
nextToken: smithy_client_1.expectString,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
return contents;
|
||||
};
|
||||
exports.de_ListAccountsCommand = de_ListAccountsCommand;
|
||||
const de_ListAccountsCommandError = 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 de_LogoutCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_LogoutCommandError(output, context);
|
||||
}
|
||||
const contents = (0, smithy_client_1.map)({
|
||||
$metadata: deserializeMetadata(output),
|
||||
});
|
||||
await (0, smithy_client_1.collectBody)(output.body, context);
|
||||
return contents;
|
||||
};
|
||||
exports.de_LogoutCommand = de_LogoutCommand;
|
||||
const de_LogoutCommandError = 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 "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 = (0, smithy_client_1.withBaseException)(SSOServiceException_1.SSOServiceException);
|
||||
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
||||
const contents = (0, smithy_client_1.map)({});
|
||||
const data = parsedOutput.body;
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
message: smithy_client_1.expectString,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
const exception = new models_0_1.InvalidRequestException({
|
||||
$metadata: deserializeMetadata(parsedOutput),
|
||||
...contents,
|
||||
});
|
||||
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
||||
};
|
||||
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
||||
const contents = (0, smithy_client_1.map)({});
|
||||
const data = parsedOutput.body;
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
message: smithy_client_1.expectString,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
const exception = new models_0_1.ResourceNotFoundException({
|
||||
$metadata: deserializeMetadata(parsedOutput),
|
||||
...contents,
|
||||
});
|
||||
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
||||
};
|
||||
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
||||
const contents = (0, smithy_client_1.map)({});
|
||||
const data = parsedOutput.body;
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
message: smithy_client_1.expectString,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
const exception = new models_0_1.TooManyRequestsException({
|
||||
$metadata: deserializeMetadata(parsedOutput),
|
||||
...contents,
|
||||
});
|
||||
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
||||
};
|
||||
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
||||
const contents = (0, smithy_client_1.map)({});
|
||||
const data = parsedOutput.body;
|
||||
const doc = (0, smithy_client_1.take)(data, {
|
||||
message: smithy_client_1.expectString,
|
||||
});
|
||||
Object.assign(contents, doc);
|
||||
const exception = new models_0_1.UnauthorizedException({
|
||||
$metadata: deserializeMetadata(parsedOutput),
|
||||
...contents,
|
||||
});
|
||||
return (0, smithy_client_1.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) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
||||
const isSerializableHeaderValue = (value) => value !== undefined &&
|
||||
value !== null &&
|
||||
value !== "" &&
|
||||
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
||||
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
||||
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
||||
if (encoded.length) {
|
||||
return JSON.parse(encoded);
|
||||
}
|
||||
return {};
|
||||
});
|
||||
const parseErrorBody = async (errorBody, context) => {
|
||||
const value = await parseBody(errorBody, context);
|
||||
value.message = value.message ?? value.Message;
|
||||
return value;
|
||||
};
|
||||
const loadRestJsonErrorCode = (output, data) => {
|
||||
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
||||
const sanitizeErrorCode = (rawValue) => {
|
||||
let cleanValue = rawValue;
|
||||
if (typeof cleanValue === "number") {
|
||||
cleanValue = cleanValue.toString();
|
||||
}
|
||||
if (cleanValue.indexOf(",") >= 0) {
|
||||
cleanValue = cleanValue.split(",")[0];
|
||||
}
|
||||
if (cleanValue.indexOf(":") >= 0) {
|
||||
cleanValue = cleanValue.split(":")[0];
|
||||
}
|
||||
if (cleanValue.indexOf("#") >= 0) {
|
||||
cleanValue = cleanValue.split("#")[1];
|
||||
}
|
||||
return cleanValue;
|
||||
};
|
||||
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
||||
if (headerKey !== undefined) {
|
||||
return sanitizeErrorCode(output.headers[headerKey]);
|
||||
}
|
||||
if (data.code !== undefined) {
|
||||
return sanitizeErrorCode(data.code);
|
||||
}
|
||||
if (data["__type"] !== undefined) {
|
||||
return sanitizeErrorCode(data["__type"]);
|
||||
}
|
||||
};
|
||||
+38
@@ -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.defaultUserAgent)({ 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: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(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;
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
"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);
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
(0, util_user_agent_node_1.defaultUserAgent)({ 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),
|
||||
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
||||
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(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,
|
||||
}),
|
||||
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),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+15
@@ -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;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
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 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 ?? [],
|
||||
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;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveRuntimeExtensions = void 0;
|
||||
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
||||
const protocol_http_1 = require("@smithy/protocol-http");
|
||||
const smithy_client_1 = require("@smithy/smithy-client");
|
||||
const asPartial = (t) => t;
|
||||
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
||||
const extensionConfiguration = {
|
||||
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
||||
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
||||
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
||||
};
|
||||
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
||||
return {
|
||||
...runtimeConfig,
|
||||
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
||||
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
||||
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
||||
};
|
||||
};
|
||||
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
||||
+15
@@ -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);
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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 { 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 { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
||||
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
||||
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
||||
export { __Client };
|
||||
export class SSOClient extends __Client {
|
||||
constructor(...[configuration]) {
|
||||
const _config_0 = __getRuntimeConfig(configuration || {});
|
||||
const _config_1 = resolveClientEndpointParameters(_config_0);
|
||||
const _config_2 = resolveRegionConfig(_config_1);
|
||||
const _config_3 = resolveEndpointConfig(_config_2);
|
||||
const _config_4 = resolveRetryConfig(_config_3);
|
||||
const _config_5 = resolveHostHeaderConfig(_config_4);
|
||||
const _config_6 = resolveUserAgentConfig(_config_5);
|
||||
const _config_7 = resolveRuntimeExtensions(_config_6, configuration?.extensions || []);
|
||||
super(_config_7);
|
||||
this.config = _config_7;
|
||||
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(getUserAgentPlugin(this.config));
|
||||
}
|
||||
destroy() {
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
||||
import { getSerdePlugin } from "@smithy/middleware-serde";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
||||
import { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from "../models/models_0";
|
||||
import { de_GetRoleCredentialsCommand, se_GetRoleCredentialsCommand } from "../protocols/Aws_restJson1";
|
||||
export { $Command };
|
||||
export class GetRoleCredentialsCommand extends $Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use(getEndpointPlugin(configuration, GetRoleCredentialsCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "GetRoleCredentialsCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: GetRoleCredentialsRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: GetRoleCredentialsResponseFilterSensitiveLog,
|
||||
[SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "GetRoleCredentials",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return se_GetRoleCredentialsCommand(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return de_GetRoleCredentialsCommand(output, context);
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
||||
import { getSerdePlugin } from "@smithy/middleware-serde";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
||||
import { ListAccountRolesRequestFilterSensitiveLog, } from "../models/models_0";
|
||||
import { de_ListAccountRolesCommand, se_ListAccountRolesCommand } from "../protocols/Aws_restJson1";
|
||||
export { $Command };
|
||||
export class ListAccountRolesCommand extends $Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use(getEndpointPlugin(configuration, ListAccountRolesCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "ListAccountRolesCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: ListAccountRolesRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "ListAccountRoles",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return se_ListAccountRolesCommand(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return de_ListAccountRolesCommand(output, context);
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
||||
import { getSerdePlugin } from "@smithy/middleware-serde";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
||||
import { ListAccountsRequestFilterSensitiveLog } from "../models/models_0";
|
||||
import { de_ListAccountsCommand, se_ListAccountsCommand } from "../protocols/Aws_restJson1";
|
||||
export { $Command };
|
||||
export class ListAccountsCommand extends $Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use(getEndpointPlugin(configuration, ListAccountsCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "ListAccountsCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: ListAccountsRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "ListAccounts",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return se_ListAccountsCommand(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return de_ListAccountsCommand(output, context);
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
||||
import { getSerdePlugin } from "@smithy/middleware-serde";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
||||
import { LogoutRequestFilterSensitiveLog } from "../models/models_0";
|
||||
import { de_LogoutCommand, se_LogoutCommand } from "../protocols/Aws_restJson1";
|
||||
export { $Command };
|
||||
export class LogoutCommand extends $Command {
|
||||
static getEndpointParameterInstructions() {
|
||||
return {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
}
|
||||
constructor(input) {
|
||||
super();
|
||||
this.input = input;
|
||||
}
|
||||
resolveMiddleware(clientStack, configuration, options) {
|
||||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
||||
this.middlewareStack.use(getEndpointPlugin(configuration, LogoutCommand.getEndpointParameterInstructions()));
|
||||
const stack = clientStack.concat(this.middlewareStack);
|
||||
const { logger } = configuration;
|
||||
const clientName = "SSOClient";
|
||||
const commandName = "LogoutCommand";
|
||||
const handlerExecutionContext = {
|
||||
logger,
|
||||
clientName,
|
||||
commandName,
|
||||
inputFilterSensitiveLog: LogoutRequestFilterSensitiveLog,
|
||||
outputFilterSensitiveLog: (_) => _,
|
||||
[SMITHY_CONTEXT_KEY]: {
|
||||
service: "SWBPortalService",
|
||||
operation: "Logout",
|
||||
},
|
||||
};
|
||||
const { requestHandler } = configuration;
|
||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
||||
}
|
||||
serialize(input, context) {
|
||||
return se_LogoutCommand(input, context);
|
||||
}
|
||||
deserialize(output, context) {
|
||||
return de_LogoutCommand(output, context);
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export * from "./GetRoleCredentialsCommand";
|
||||
export * from "./ListAccountRolesCommand";
|
||||
export * from "./ListAccountsCommand";
|
||||
export * from "./LogoutCommand";
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export const resolveClientEndpointParameters = (options) => {
|
||||
return {
|
||||
...options,
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
defaultSigningName: "awsssoportal",
|
||||
};
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { resolveEndpoint } from "@smithy/util-endpoints";
|
||||
import { ruleSet } from "./ruleset";
|
||||
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return resolveEndpoint(ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
});
|
||||
};
|
||||
+4
@@ -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;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export * from "./SSOClient";
|
||||
export * from "./SSO";
|
||||
export * from "./commands";
|
||||
export * from "./pagination";
|
||||
export * from "./models";
|
||||
import "@aws-sdk/util-endpoints";
|
||||
export { SSOServiceException } from "./models/SSOServiceException";
|
||||
+8
@@ -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);
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from "./models_0";
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
||||
import { SSOServiceException as __BaseException } from "./SSOServiceException";
|
||||
export class InvalidRequestException extends __BaseException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidRequestException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "InvalidRequestException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, InvalidRequestException.prototype);
|
||||
}
|
||||
}
|
||||
export class ResourceNotFoundException extends __BaseException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ResourceNotFoundException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "ResourceNotFoundException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
||||
}
|
||||
}
|
||||
export class TooManyRequestsException extends __BaseException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "TooManyRequestsException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "TooManyRequestsException";
|
||||
this.$fault = "client";
|
||||
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
||||
}
|
||||
}
|
||||
export class UnauthorizedException extends __BaseException {
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "UnauthorizedException",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
this.name = "UnauthorizedException";
|
||||
this.$fault = "client";
|
||||
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 }),
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { ListAccountRolesCommand, } from "../commands/ListAccountRolesCommand";
|
||||
import { SSOClient } from "../SSOClient";
|
||||
const makePagedClientRequest = async (client, input, ...args) => {
|
||||
return await client.send(new ListAccountRolesCommand(input), ...args);
|
||||
};
|
||||
export async function* paginateListAccountRoles(config, input, ...additionalArguments) {
|
||||
let token = config.startingToken || undefined;
|
||||
let hasNext = true;
|
||||
let page;
|
||||
while (hasNext) {
|
||||
input.nextToken = token;
|
||||
input["maxResults"] = config.pageSize;
|
||||
if (config.client instanceof SSOClient) {
|
||||
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
||||
}
|
||||
else {
|
||||
throw new Error("Invalid client, expected SSO | SSOClient");
|
||||
}
|
||||
yield page;
|
||||
const prevToken = token;
|
||||
token = page.nextToken;
|
||||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { ListAccountsCommand, } from "../commands/ListAccountsCommand";
|
||||
import { SSOClient } from "../SSOClient";
|
||||
const makePagedClientRequest = async (client, input, ...args) => {
|
||||
return await client.send(new ListAccountsCommand(input), ...args);
|
||||
};
|
||||
export async function* paginateListAccounts(config, input, ...additionalArguments) {
|
||||
let token = config.startingToken || undefined;
|
||||
let hasNext = true;
|
||||
let page;
|
||||
while (hasNext) {
|
||||
input.nextToken = token;
|
||||
input["maxResults"] = config.pageSize;
|
||||
if (config.client instanceof SSOClient) {
|
||||
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
||||
}
|
||||
else {
|
||||
throw new Error("Invalid client, expected SSO | SSOClient");
|
||||
}
|
||||
yield page;
|
||||
const prevToken = token;
|
||||
token = page.nextToken;
|
||||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./Interfaces";
|
||||
export * from "./ListAccountRolesPaginator";
|
||||
export * from "./ListAccountsPaginator";
|
||||
+356
@@ -0,0 +1,356 @@
|
||||
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
||||
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, 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 { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = map({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials";
|
||||
const query = map({
|
||||
role_name: [, __expectNonNull(input.roleName, `roleName`)],
|
||||
account_id: [, __expectNonNull(input.accountId, `accountId`)],
|
||||
});
|
||||
let body;
|
||||
return new __HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
export const se_ListAccountRolesCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = map({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles";
|
||||
const query = map({
|
||||
next_token: [, input.nextToken],
|
||||
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
||||
account_id: [, __expectNonNull(input.accountId, `accountId`)],
|
||||
});
|
||||
let body;
|
||||
return new __HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
export const se_ListAccountsCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = map({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts";
|
||||
const query = map({
|
||||
next_token: [, input.nextToken],
|
||||
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
||||
});
|
||||
let body;
|
||||
return new __HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "GET",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
query,
|
||||
body,
|
||||
});
|
||||
};
|
||||
export const se_LogoutCommand = async (input, context) => {
|
||||
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
||||
const headers = map({}, isSerializableHeaderValue, {
|
||||
"x-amz-sso_bearer_token": input.accessToken,
|
||||
});
|
||||
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logout";
|
||||
let body;
|
||||
return new __HttpRequest({
|
||||
protocol,
|
||||
hostname,
|
||||
port,
|
||||
method: "POST",
|
||||
headers,
|
||||
path: resolvedPath,
|
||||
body,
|
||||
});
|
||||
};
|
||||
export const de_GetRoleCredentialsCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_GetRoleCredentialsCommandError(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;
|
||||
};
|
||||
const de_GetRoleCredentialsCommandError = 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,
|
||||
});
|
||||
}
|
||||
};
|
||||
export const de_ListAccountRolesCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_ListAccountRolesCommandError(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;
|
||||
};
|
||||
const de_ListAccountRolesCommandError = 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,
|
||||
});
|
||||
}
|
||||
};
|
||||
export const de_ListAccountsCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_ListAccountsCommandError(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;
|
||||
};
|
||||
const de_ListAccountsCommandError = 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,
|
||||
});
|
||||
}
|
||||
};
|
||||
export const de_LogoutCommand = async (output, context) => {
|
||||
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
||||
return de_LogoutCommandError(output, context);
|
||||
}
|
||||
const contents = map({
|
||||
$metadata: deserializeMetadata(output),
|
||||
});
|
||||
await collectBody(output.body, context);
|
||||
return contents;
|
||||
};
|
||||
const de_LogoutCommandError = 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 "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 isSerializableHeaderValue = (value) => value !== undefined &&
|
||||
value !== null &&
|
||||
value !== "" &&
|
||||
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
||||
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
||||
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
||||
if (encoded.length) {
|
||||
return JSON.parse(encoded);
|
||||
}
|
||||
return {};
|
||||
});
|
||||
const parseErrorBody = async (errorBody, context) => {
|
||||
const value = await parseBody(errorBody, context);
|
||||
value.message = value.message ?? value.Message;
|
||||
return value;
|
||||
};
|
||||
const loadRestJsonErrorCode = (output, data) => {
|
||||
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
||||
const sanitizeErrorCode = (rawValue) => {
|
||||
let cleanValue = rawValue;
|
||||
if (typeof cleanValue === "number") {
|
||||
cleanValue = cleanValue.toString();
|
||||
}
|
||||
if (cleanValue.indexOf(",") >= 0) {
|
||||
cleanValue = cleanValue.split(",")[0];
|
||||
}
|
||||
if (cleanValue.indexOf(":") >= 0) {
|
||||
cleanValue = cleanValue.split(":")[0];
|
||||
}
|
||||
if (cleanValue.indexOf("#") >= 0) {
|
||||
cleanValue = cleanValue.split("#")[1];
|
||||
}
|
||||
return cleanValue;
|
||||
};
|
||||
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
||||
if (headerKey !== undefined) {
|
||||
return sanitizeErrorCode(output.headers[headerKey]);
|
||||
}
|
||||
if (data.code !== undefined) {
|
||||
return sanitizeErrorCode(data.code);
|
||||
}
|
||||
if (data["__type"] !== undefined) {
|
||||
return sanitizeErrorCode(data["__type"]);
|
||||
}
|
||||
};
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import packageInfo from "../package.json";
|
||||
import { Sha256 } from "@aws-crypto/sha256-browser";
|
||||
import { defaultUserAgent } 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 ??
|
||||
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
||||
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
||||
region: config?.region ?? invalidProvider("Region is missing"),
|
||||
requestHandler: config?.requestHandler ?? new 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)),
|
||||
};
|
||||
};
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
import packageInfo from "../package.json";
|
||||
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
||||
import { defaultUserAgent } 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);
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
||||
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
||||
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
||||
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
||||
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
||||
retryMode: config?.retryMode ??
|
||||
loadNodeConfig({
|
||||
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
||||
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
||||
}),
|
||||
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
||||
streamCollector: config?.streamCollector ?? streamCollector,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
||||
};
|
||||
};
|
||||
+11
@@ -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,
|
||||
};
|
||||
};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
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 { 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 ?? [],
|
||||
logger: config?.logger ?? new NoOpLogger(),
|
||||
serviceId: config?.serviceId ?? "SSO",
|
||||
urlParser: config?.urlParser ?? parseUrl,
|
||||
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
||||
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
||||
};
|
||||
};
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
||||
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
||||
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
||||
const asPartial = (t) => t;
|
||||
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
||||
const extensionConfiguration = {
|
||||
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
||||
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
||||
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
||||
};
|
||||
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
||||
return {
|
||||
...runtimeConfig,
|
||||
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
||||
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
||||
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
||||
};
|
||||
};
|
||||
+53
@@ -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;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
export declare class SSO extends SSOClient implements SSO {
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
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 { HttpHandler as __HttpHandler } 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 { 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<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
||||
/**
|
||||
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
||||
*/
|
||||
requestHandler?: __HttpHandler;
|
||||
/**
|
||||
* 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>;
|
||||
/**
|
||||
* 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 & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & 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 & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & 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 {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
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;
|
||||
}
|
||||
Generated
Vendored
+96
@@ -0,0 +1,96 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
||||
import { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0";
|
||||
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export { __MetadataBearer, $Command };
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The input for {@link GetRoleCredentialsCommand}.
|
||||
*/
|
||||
export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The output of {@link GetRoleCredentialsCommand}.
|
||||
*/
|
||||
export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*
|
||||
*/
|
||||
export declare class GetRoleCredentialsCommand extends $Command<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig> {
|
||||
readonly input: GetRoleCredentialsCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
constructor(input: GetRoleCredentialsCommandInput);
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private serialize;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private deserialize;
|
||||
}
|
||||
Generated
Vendored
+97
@@ -0,0 +1,97 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
||||
import { ListAccountRolesRequest, ListAccountRolesResponse } from "../models/models_0";
|
||||
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export { __MetadataBearer, $Command };
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The input for {@link ListAccountRolesCommand}.
|
||||
*/
|
||||
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The output of {@link ListAccountRolesCommand}.
|
||||
*/
|
||||
export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*
|
||||
*/
|
||||
export declare class ListAccountRolesCommand extends $Command<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig> {
|
||||
readonly input: ListAccountRolesCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
constructor(input: ListAccountRolesCommandInput);
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListAccountRolesCommandInput, ListAccountRolesCommandOutput>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private serialize;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private deserialize;
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
||||
import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
|
||||
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export { __MetadataBearer, $Command };
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The input for {@link ListAccountsCommand}.
|
||||
*/
|
||||
export interface ListAccountsCommandInput extends ListAccountsRequest {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The output of {@link ListAccountsCommand}.
|
||||
*/
|
||||
export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*
|
||||
*/
|
||||
export declare class ListAccountsCommand extends $Command<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig> {
|
||||
readonly input: ListAccountsCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
constructor(input: ListAccountsCommandInput);
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListAccountsCommandInput, ListAccountsCommandOutput>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private serialize;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private deserialize;
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
||||
import { LogoutRequest } from "../models/models_0";
|
||||
import { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export { __MetadataBearer, $Command };
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The input for {@link LogoutCommand}.
|
||||
*/
|
||||
export interface LogoutCommandInput extends LogoutRequest {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* The output of {@link LogoutCommand}.
|
||||
*/
|
||||
export interface LogoutCommandOutput extends __MetadataBearer {
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to
|
||||
* the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in
|
||||
* session.</p>
|
||||
* <note>
|
||||
* <p>If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is
|
||||
* used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set.
|
||||
* More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user,
|
||||
* and the corresponding temporary AWS credentials are returned to the client.</p>
|
||||
* <p>After user logout, any existing IAM role sessions that were created by using IAM Identity Center
|
||||
* permission sets continue based on the duration configured in the permission set.
|
||||
* For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User
|
||||
* authentications</a> in the <i>IAM Identity Center User
|
||||
* Guide</i>.</p>
|
||||
* </note>
|
||||
* @example
|
||||
* Use a bare-bones client and the command you need to make an API call.
|
||||
* ```javascript
|
||||
* import { SSOClient, LogoutCommand } from "@aws-sdk/client-sso"; // ES Modules import
|
||||
* // const { SSOClient, LogoutCommand } = require("@aws-sdk/client-sso"); // CommonJS import
|
||||
* const client = new SSOClient(config);
|
||||
* const 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>
|
||||
*
|
||||
*/
|
||||
export declare class LogoutCommand extends $Command<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig> {
|
||||
readonly input: LogoutCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
constructor(input: LogoutCommandInput);
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOClientResolvedConfig, options?: __HttpHandlerOptions): Handler<LogoutCommandInput, LogoutCommandOutput>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private serialize;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private deserialize;
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export * from "./GetRoleCredentialsCommand";
|
||||
export * from "./ListAccountRolesCommand";
|
||||
export * from "./ListAccountsCommand";
|
||||
export * from "./LogoutCommand";
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ClientInputEndpointParameters {
|
||||
region?: string | Provider<string>;
|
||||
useDualstackEndpoint?: boolean | Provider<boolean>;
|
||||
useFipsEndpoint?: boolean | Provider<boolean>;
|
||||
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
|
||||
}
|
||||
export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
|
||||
defaultSigningName: string;
|
||||
};
|
||||
export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & {
|
||||
defaultSigningName: string;
|
||||
};
|
||||
export interface EndpointParameters extends __EndpointParameters {
|
||||
Region?: string;
|
||||
UseDualStack?: boolean;
|
||||
UseFIPS?: boolean;
|
||||
Endpoint?: string;
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { EndpointV2, Logger } from "@smithy/types";
|
||||
import { EndpointParameters } from "./EndpointParameters";
|
||||
export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: {
|
||||
logger?: Logger;
|
||||
}) => EndpointV2;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { RuleSetObject } from "@smithy/types";
|
||||
export declare const ruleSet: RuleSetObject;
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
||||
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
||||
import { DefaultExtensionConfiguration } from "@smithy/types";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface SSOExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* <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 { RuntimeExtension } from "./runtimeExtensions";
|
||||
export { SSOExtensionConfiguration } from "./extensionConfiguration";
|
||||
export * from "./commands";
|
||||
export * from "./pagination";
|
||||
export * from "./models";
|
||||
import "@aws-sdk/util-endpoints";
|
||||
export { SSOServiceException } from "./models/SSOServiceException";
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
|
||||
export { __ServiceException, __ServiceExceptionOptions };
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* Base exception class for all service exceptions from SSO service.
|
||||
*/
|
||||
export declare class SSOServiceException extends __ServiceException {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(options: __ServiceExceptionOptions);
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from "./models_0";
|
||||
+266
@@ -0,0 +1,266 @@
|
||||
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
||||
import { SSOServiceException as __BaseException } from "./SSOServiceException";
|
||||
/**
|
||||
* @public
|
||||
* <p>Provides information about your AWS account.</p>
|
||||
*/
|
||||
export interface AccountInfo {
|
||||
/**
|
||||
* @public
|
||||
* <p>The identifier of the AWS account that is assigned to the user.</p>
|
||||
*/
|
||||
accountId?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>The display name of the AWS account that is assigned to the user.</p>
|
||||
*/
|
||||
accountName?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>The email address of the AWS account that is assigned to the user.</p>
|
||||
*/
|
||||
emailAddress?: string;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface GetRoleCredentialsRequest {
|
||||
/**
|
||||
* @public
|
||||
* <p>The friendly name of the role that is assigned to the user.</p>
|
||||
*/
|
||||
roleName: string | undefined;
|
||||
/**
|
||||
* @public
|
||||
* <p>The identifier for the AWS account that is assigned to the user.</p>
|
||||
*/
|
||||
accountId: string | undefined;
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
accessToken: string | undefined;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>Provides information about the role credentials that are assigned to the user.</p>
|
||||
*/
|
||||
export interface RoleCredentials {
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
accessKeyId?: string;
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
secretAccessKey?: string;
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
sessionToken?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>The date on which temporary security credentials expire.</p>
|
||||
*/
|
||||
expiration?: number;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface GetRoleCredentialsResponse {
|
||||
/**
|
||||
* @public
|
||||
* <p>The credentials for the role that is assigned to the user.</p>
|
||||
*/
|
||||
roleCredentials?: RoleCredentials;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
export declare class InvalidRequestException extends __BaseException {
|
||||
readonly name: "InvalidRequestException";
|
||||
readonly $fault: "client";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>The specified resource doesn't exist.</p>
|
||||
*/
|
||||
export declare class ResourceNotFoundException extends __BaseException {
|
||||
readonly name: "ResourceNotFoundException";
|
||||
readonly $fault: "client";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>Indicates that the request is being made too frequently and is more than what the server
|
||||
* can handle.</p>
|
||||
*/
|
||||
export declare class TooManyRequestsException extends __BaseException {
|
||||
readonly name: "TooManyRequestsException";
|
||||
readonly $fault: "client";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
|
||||
* token in the request.</p>
|
||||
*/
|
||||
export declare class UnauthorizedException extends __BaseException {
|
||||
readonly name: "UnauthorizedException";
|
||||
readonly $fault: "client";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ListAccountRolesRequest {
|
||||
/**
|
||||
* @public
|
||||
* <p>The page token from the previous response output when you request subsequent pages.</p>
|
||||
*/
|
||||
nextToken?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>The number of items that clients can request per page.</p>
|
||||
*/
|
||||
maxResults?: number;
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
accessToken: string | undefined;
|
||||
/**
|
||||
* @public
|
||||
* <p>The identifier for the AWS account that is assigned to the user.</p>
|
||||
*/
|
||||
accountId: string | undefined;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
* <p>Provides information about the role that is assigned to the user.</p>
|
||||
*/
|
||||
export interface RoleInfo {
|
||||
/**
|
||||
* @public
|
||||
* <p>The friendly name of the role that is assigned to the user.</p>
|
||||
*/
|
||||
roleName?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>The identifier of the AWS account assigned to the user.</p>
|
||||
*/
|
||||
accountId?: string;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ListAccountRolesResponse {
|
||||
/**
|
||||
* @public
|
||||
* <p>The page token client that is used to retrieve the list of accounts.</p>
|
||||
*/
|
||||
nextToken?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>A paginated response with the list of roles and the next token if more results are
|
||||
* available.</p>
|
||||
*/
|
||||
roleList?: RoleInfo[];
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ListAccountsRequest {
|
||||
/**
|
||||
* @public
|
||||
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous
|
||||
* response output.</p>
|
||||
*/
|
||||
nextToken?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>This is the number of items clients can request per page.</p>
|
||||
*/
|
||||
maxResults?: number;
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
accessToken: string | undefined;
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface ListAccountsResponse {
|
||||
/**
|
||||
* @public
|
||||
* <p>The page token client that is used to retrieve the list of accounts.</p>
|
||||
*/
|
||||
nextToken?: string;
|
||||
/**
|
||||
* @public
|
||||
* <p>A paginated response with the list of account information and the next token if more
|
||||
* results are available.</p>
|
||||
*/
|
||||
accountList?: AccountInfo[];
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface LogoutRequest {
|
||||
/**
|
||||
* @public
|
||||
* <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>
|
||||
*/
|
||||
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;
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { PaginationConfiguration } from "@smithy/types";
|
||||
import { SSOClient } from "../SSOClient";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface SSOPaginationConfiguration extends PaginationConfiguration {
|
||||
client: SSOClient;
|
||||
}
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import { Paginator } from "@smithy/types";
|
||||
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand";
|
||||
import { SSOPaginationConfiguration } from "./Interfaces";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export declare function paginateListAccountRoles(config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...additionalArguments: any): Paginator<ListAccountRolesCommandOutput>;
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import { Paginator } from "@smithy/types";
|
||||
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand";
|
||||
import { SSOPaginationConfiguration } from "./Interfaces";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export declare function paginateListAccounts(config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...additionalArguments: any): Paginator<ListAccountsCommandOutput>;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./Interfaces";
|
||||
export * from "./ListAccountRolesPaginator";
|
||||
export * from "./ListAccountsPaginator";
|
||||
+38
@@ -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>;
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
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: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
||||
maxAttempts: number | import("@smithy/types").Provider<number>;
|
||||
region: string | import("@smithy/types").Provider<any>;
|
||||
requestHandler: (import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
}) | 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>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
logger: import("@smithy/types").Logger;
|
||||
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
||||
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 | undefined;
|
||||
}) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
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>;
|
||||
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
||||
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
||||
maxAttempts: number | import("@smithy/types").Provider<number>;
|
||||
region: string | import("@smithy/types").Provider<string>;
|
||||
requestHandler: (import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
}) | 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>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
logger: import("@smithy/types").Logger;
|
||||
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
||||
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 | undefined;
|
||||
}) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
import { SSOClientConfig } from "./SSOClient";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
||||
runtime: string;
|
||||
sha256: import("@smithy/types").HashConstructor;
|
||||
requestHandler: (import("@smithy/types").RequestHandler<any, any, import("@smithy/types").HttpHandlerOptions> & import("@smithy/types").RequestHandler<import("@smithy/protocol-http").HttpRequest, import("@smithy/protocol-http").HttpResponse, import("@smithy/types").HttpHandlerOptions> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
}) | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
||||
streamCollector: import("@smithy/types").StreamCollector;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
region: string | import("@smithy/types").Provider<any>;
|
||||
defaultUserAgentProvider: import("@smithy/types").Provider<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>;
|
||||
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> | undefined;
|
||||
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
||||
logger?: import("@smithy/types").Logger | undefined;
|
||||
}) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import { SSOClientConfig } from "./SSOClient";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
||||
apiVersion: string;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
||||
logger?: import("@smithy/types").Logger | undefined;
|
||||
}) => import("@smithy/types").EndpointV2;
|
||||
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
||||
logger: import("@smithy/types").Logger;
|
||||
serviceId: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
};
|
||||
+17
@@ -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;
|
||||
+73
@@ -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 {}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
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 { HttpHandler as __HttpHandler } 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 {
|
||||
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<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
||||
requestHandler?: __HttpHandler;
|
||||
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>;
|
||||
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 &
|
||||
RegionInputConfig &
|
||||
EndpointInputConfig<EndpointParameters> &
|
||||
RetryInputConfig &
|
||||
HostHeaderInputConfig &
|
||||
UserAgentInputConfig &
|
||||
ClientInputEndpointParameters;
|
||||
export interface SSOClientConfig extends SSOClientConfigType {}
|
||||
export type SSOClientResolvedConfigType =
|
||||
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
||||
Required<ClientDefaults> &
|
||||
RuntimeExtensionsConfig &
|
||||
RegionResolvedConfig &
|
||||
EndpointResolvedConfig<EndpointParameters> &
|
||||
RetryResolvedConfig &
|
||||
HostHeaderResolvedConfig &
|
||||
UserAgentResolvedConfig &
|
||||
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;
|
||||
}
|
||||
Generated
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import {
|
||||
Handler,
|
||||
HttpHandlerOptions as __HttpHandlerOptions,
|
||||
MetadataBearer as __MetadataBearer,
|
||||
MiddlewareStack,
|
||||
} from "@smithy/types";
|
||||
import {
|
||||
GetRoleCredentialsRequest,
|
||||
GetRoleCredentialsResponse,
|
||||
} from "../models/models_0";
|
||||
import {
|
||||
ServiceInputTypes,
|
||||
ServiceOutputTypes,
|
||||
SSOClientResolvedConfig,
|
||||
} from "../SSOClient";
|
||||
export { __MetadataBearer, $Command };
|
||||
export interface GetRoleCredentialsCommandInput
|
||||
extends GetRoleCredentialsRequest {}
|
||||
export interface GetRoleCredentialsCommandOutput
|
||||
extends GetRoleCredentialsResponse,
|
||||
__MetadataBearer {}
|
||||
export declare class GetRoleCredentialsCommand extends $Command<
|
||||
GetRoleCredentialsCommandInput,
|
||||
GetRoleCredentialsCommandOutput,
|
||||
SSOClientResolvedConfig
|
||||
> {
|
||||
readonly input: GetRoleCredentialsCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
constructor(input: GetRoleCredentialsCommandInput);
|
||||
resolveMiddleware(
|
||||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
||||
configuration: SSOClientResolvedConfig,
|
||||
options?: __HttpHandlerOptions
|
||||
): Handler<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput>;
|
||||
private serialize;
|
||||
private deserialize;
|
||||
}
|
||||
Generated
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import {
|
||||
Handler,
|
||||
HttpHandlerOptions as __HttpHandlerOptions,
|
||||
MetadataBearer as __MetadataBearer,
|
||||
MiddlewareStack,
|
||||
} from "@smithy/types";
|
||||
import {
|
||||
ListAccountRolesRequest,
|
||||
ListAccountRolesResponse,
|
||||
} from "../models/models_0";
|
||||
import {
|
||||
ServiceInputTypes,
|
||||
ServiceOutputTypes,
|
||||
SSOClientResolvedConfig,
|
||||
} from "../SSOClient";
|
||||
export { __MetadataBearer, $Command };
|
||||
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {}
|
||||
export interface ListAccountRolesCommandOutput
|
||||
extends ListAccountRolesResponse,
|
||||
__MetadataBearer {}
|
||||
export declare class ListAccountRolesCommand extends $Command<
|
||||
ListAccountRolesCommandInput,
|
||||
ListAccountRolesCommandOutput,
|
||||
SSOClientResolvedConfig
|
||||
> {
|
||||
readonly input: ListAccountRolesCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
constructor(input: ListAccountRolesCommandInput);
|
||||
resolveMiddleware(
|
||||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
||||
configuration: SSOClientResolvedConfig,
|
||||
options?: __HttpHandlerOptions
|
||||
): Handler<ListAccountRolesCommandInput, ListAccountRolesCommandOutput>;
|
||||
private serialize;
|
||||
private deserialize;
|
||||
}
|
||||
Generated
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import {
|
||||
Handler,
|
||||
HttpHandlerOptions as __HttpHandlerOptions,
|
||||
MetadataBearer as __MetadataBearer,
|
||||
MiddlewareStack,
|
||||
} from "@smithy/types";
|
||||
import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
|
||||
import {
|
||||
ServiceInputTypes,
|
||||
ServiceOutputTypes,
|
||||
SSOClientResolvedConfig,
|
||||
} from "../SSOClient";
|
||||
export { __MetadataBearer, $Command };
|
||||
export interface ListAccountsCommandInput extends ListAccountsRequest {}
|
||||
export interface ListAccountsCommandOutput
|
||||
extends ListAccountsResponse,
|
||||
__MetadataBearer {}
|
||||
export declare class ListAccountsCommand extends $Command<
|
||||
ListAccountsCommandInput,
|
||||
ListAccountsCommandOutput,
|
||||
SSOClientResolvedConfig
|
||||
> {
|
||||
readonly input: ListAccountsCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
constructor(input: ListAccountsCommandInput);
|
||||
resolveMiddleware(
|
||||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
||||
configuration: SSOClientResolvedConfig,
|
||||
options?: __HttpHandlerOptions
|
||||
): Handler<ListAccountsCommandInput, ListAccountsCommandOutput>;
|
||||
private serialize;
|
||||
private deserialize;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
||||
import { Command as $Command } from "@smithy/smithy-client";
|
||||
import {
|
||||
Handler,
|
||||
HttpHandlerOptions as __HttpHandlerOptions,
|
||||
MetadataBearer as __MetadataBearer,
|
||||
MiddlewareStack,
|
||||
} from "@smithy/types";
|
||||
import { LogoutRequest } from "../models/models_0";
|
||||
import {
|
||||
ServiceInputTypes,
|
||||
ServiceOutputTypes,
|
||||
SSOClientResolvedConfig,
|
||||
} from "../SSOClient";
|
||||
export { __MetadataBearer, $Command };
|
||||
export interface LogoutCommandInput extends LogoutRequest {}
|
||||
export interface LogoutCommandOutput extends __MetadataBearer {}
|
||||
export declare class LogoutCommand extends $Command<
|
||||
LogoutCommandInput,
|
||||
LogoutCommandOutput,
|
||||
SSOClientResolvedConfig
|
||||
> {
|
||||
readonly input: LogoutCommandInput;
|
||||
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
||||
constructor(input: LogoutCommandInput);
|
||||
resolveMiddleware(
|
||||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
||||
configuration: SSOClientResolvedConfig,
|
||||
options?: __HttpHandlerOptions
|
||||
): Handler<LogoutCommandInput, LogoutCommandOutput>;
|
||||
private serialize;
|
||||
private deserialize;
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export * from "./GetRoleCredentialsCommand";
|
||||
export * from "./ListAccountRolesCommand";
|
||||
export * from "./ListAccountsCommand";
|
||||
export * from "./LogoutCommand";
|
||||
Generated
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
Endpoint,
|
||||
EndpointParameters as __EndpointParameters,
|
||||
EndpointV2,
|
||||
Provider,
|
||||
} from "@smithy/types";
|
||||
export interface ClientInputEndpointParameters {
|
||||
region?: string | Provider<string>;
|
||||
useDualstackEndpoint?: boolean | Provider<boolean>;
|
||||
useFipsEndpoint?: boolean | Provider<boolean>;
|
||||
endpoint?:
|
||||
| string
|
||||
| Provider<string>
|
||||
| Endpoint
|
||||
| Provider<Endpoint>
|
||||
| EndpointV2
|
||||
| Provider<EndpointV2>;
|
||||
}
|
||||
export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
|
||||
defaultSigningName: string;
|
||||
};
|
||||
export declare const resolveClientEndpointParameters: <T>(
|
||||
options: T & ClientInputEndpointParameters
|
||||
) => T &
|
||||
ClientInputEndpointParameters & {
|
||||
defaultSigningName: string;
|
||||
};
|
||||
export interface EndpointParameters extends __EndpointParameters {
|
||||
Region?: string;
|
||||
UseDualStack?: boolean;
|
||||
UseFIPS?: boolean;
|
||||
Endpoint?: string;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { EndpointV2, Logger } from "@smithy/types";
|
||||
import { EndpointParameters } from "./EndpointParameters";
|
||||
export declare const defaultEndpointResolver: (
|
||||
endpointParams: EndpointParameters,
|
||||
context?: {
|
||||
logger?: Logger;
|
||||
}
|
||||
) => EndpointV2;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { RuleSetObject } from "@smithy/types";
|
||||
export declare const ruleSet: RuleSetObject;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
||||
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
||||
import { DefaultExtensionConfiguration } from "@smithy/types";
|
||||
export interface SSOExtensionConfiguration
|
||||
extends HttpHandlerExtensionConfiguration,
|
||||
DefaultExtensionConfiguration,
|
||||
AwsRegionExtensionConfiguration {}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
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";
|
||||
import "@aws-sdk/util-endpoints";
|
||||
export { SSOServiceException } from "./models/SSOServiceException";
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import {
|
||||
ServiceException as __ServiceException,
|
||||
ServiceExceptionOptions as __ServiceExceptionOptions,
|
||||
} from "@smithy/smithy-client";
|
||||
export { __ServiceException, __ServiceExceptionOptions };
|
||||
export declare class SSOServiceException extends __ServiceException {
|
||||
constructor(options: __ServiceExceptionOptions);
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from "./models_0";
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
||||
import { SSOServiceException as __BaseException } from "./SSOServiceException";
|
||||
export interface AccountInfo {
|
||||
accountId?: string;
|
||||
accountName?: string;
|
||||
emailAddress?: string;
|
||||
}
|
||||
export interface GetRoleCredentialsRequest {
|
||||
roleName: string | undefined;
|
||||
accountId: string | undefined;
|
||||
accessToken: string | undefined;
|
||||
}
|
||||
export interface RoleCredentials {
|
||||
accessKeyId?: string;
|
||||
secretAccessKey?: string;
|
||||
sessionToken?: string;
|
||||
expiration?: number;
|
||||
}
|
||||
export interface GetRoleCredentialsResponse {
|
||||
roleCredentials?: RoleCredentials;
|
||||
}
|
||||
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;
|
||||
maxResults?: number;
|
||||
accessToken: string | undefined;
|
||||
accountId: string | undefined;
|
||||
}
|
||||
export interface RoleInfo {
|
||||
roleName?: string;
|
||||
accountId?: string;
|
||||
}
|
||||
export interface ListAccountRolesResponse {
|
||||
nextToken?: string;
|
||||
roleList?: RoleInfo[];
|
||||
}
|
||||
export interface ListAccountsRequest {
|
||||
nextToken?: string;
|
||||
maxResults?: number;
|
||||
accessToken: string | undefined;
|
||||
}
|
||||
export interface ListAccountsResponse {
|
||||
nextToken?: string;
|
||||
accountList?: AccountInfo[];
|
||||
}
|
||||
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;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { PaginationConfiguration } from "@smithy/types";
|
||||
import { SSOClient } from "../SSOClient";
|
||||
export interface SSOPaginationConfiguration extends PaginationConfiguration {
|
||||
client: SSOClient;
|
||||
}
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import { Paginator } from "@smithy/types";
|
||||
import {
|
||||
ListAccountRolesCommandInput,
|
||||
ListAccountRolesCommandOutput,
|
||||
} from "../commands/ListAccountRolesCommand";
|
||||
import { SSOPaginationConfiguration } from "./Interfaces";
|
||||
export declare function paginateListAccountRoles(
|
||||
config: SSOPaginationConfiguration,
|
||||
input: ListAccountRolesCommandInput,
|
||||
...additionalArguments: any
|
||||
): Paginator<ListAccountRolesCommandOutput>;
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import { Paginator } from "@smithy/types";
|
||||
import {
|
||||
ListAccountsCommandInput,
|
||||
ListAccountsCommandOutput,
|
||||
} from "../commands/ListAccountsCommand";
|
||||
import { SSOPaginationConfiguration } from "./Interfaces";
|
||||
export declare function paginateListAccounts(
|
||||
config: SSOPaginationConfiguration,
|
||||
input: ListAccountsCommandInput,
|
||||
...additionalArguments: any
|
||||
): Paginator<ListAccountsCommandOutput>;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export * from "./Interfaces";
|
||||
export * from "./ListAccountRolesPaginator";
|
||||
export * from "./ListAccountsPaginator";
|
||||
+53
@@ -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>;
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
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: import("@smithy/types").Provider<
|
||||
import("@smithy/types").UserAgent
|
||||
>;
|
||||
maxAttempts: number | import("@smithy/types").Provider<number>;
|
||||
region: string | import("@smithy/types").Provider<any>;
|
||||
requestHandler:
|
||||
| (import("@smithy/types").RequestHandler<
|
||||
any,
|
||||
any,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> &
|
||||
import("@smithy/types").RequestHandler<
|
||||
import("@smithy/protocol-http").HttpRequest,
|
||||
import("@smithy/protocol-http").HttpResponse,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
})
|
||||
| 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>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
logger: import("@smithy/types").Logger;
|
||||
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
||||
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 | undefined;
|
||||
}
|
||||
) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?:
|
||||
| import("@smithy/types").RetryStrategy
|
||||
| import("@smithy/types").RetryStrategyV2
|
||||
| undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
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
|
||||
>;
|
||||
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
||||
defaultUserAgentProvider: import("@smithy/types").Provider<
|
||||
import("@smithy/types").UserAgent
|
||||
>;
|
||||
maxAttempts: number | import("@smithy/types").Provider<number>;
|
||||
region: string | import("@smithy/types").Provider<string>;
|
||||
requestHandler:
|
||||
| (import("@smithy/types").RequestHandler<
|
||||
any,
|
||||
any,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> &
|
||||
import("@smithy/types").RequestHandler<
|
||||
import("@smithy/protocol-http").HttpRequest,
|
||||
import("@smithy/protocol-http").HttpResponse,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
})
|
||||
| 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>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
logger: import("@smithy/types").Logger;
|
||||
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
||||
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 | undefined;
|
||||
}
|
||||
) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?:
|
||||
| import("@smithy/types").RetryStrategy
|
||||
| import("@smithy/types").RetryStrategyV2
|
||||
| undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
import { SSOClientConfig } from "./SSOClient";
|
||||
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
|
||||
runtime: string;
|
||||
sha256: import("@smithy/types").HashConstructor;
|
||||
requestHandler:
|
||||
| (import("@smithy/types").RequestHandler<
|
||||
any,
|
||||
any,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> &
|
||||
import("@smithy/types").RequestHandler<
|
||||
import("@smithy/protocol-http").HttpRequest,
|
||||
import("@smithy/protocol-http").HttpResponse,
|
||||
import("@smithy/types").HttpHandlerOptions
|
||||
> & {
|
||||
updateHttpClientConfig(key: never, value: never): void;
|
||||
httpHandlerConfigs(): {};
|
||||
})
|
||||
| import("@smithy/fetch-http-handler").FetchHttpHandler;
|
||||
apiVersion: string;
|
||||
urlParser: import("@smithy/types").UrlParser;
|
||||
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
||||
streamCollector: import("@smithy/types").StreamCollector;
|
||||
base64Decoder: import("@smithy/types").Decoder;
|
||||
base64Encoder: import("@smithy/types").Encoder;
|
||||
utf8Decoder: import("@smithy/types").Decoder;
|
||||
utf8Encoder: import("@smithy/types").Encoder;
|
||||
disableHostPrefix: boolean;
|
||||
serviceId: string;
|
||||
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
||||
region: string | import("@smithy/types").Provider<any>;
|
||||
defaultUserAgentProvider: import("@smithy/types").Provider<
|
||||
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
|
||||
>;
|
||||
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>
|
||||
| undefined;
|
||||
endpointProvider: (
|
||||
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
|
||||
context?: {
|
||||
logger?: import("@smithy/types").Logger | undefined;
|
||||
}
|
||||
) => import("@smithy/types").EndpointV2;
|
||||
tls?: boolean | undefined;
|
||||
retryStrategy?:
|
||||
| import("@smithy/types").RetryStrategy
|
||||
| import("@smithy/types").RetryStrategyV2
|
||||
| undefined;
|
||||
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user