@aws-sdk/client-sso 3.137.0 → 3.145.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +13 -10
- package/dist-cjs/protocols/Aws_restJson1.js +71 -87
- package/dist-es/protocols/Aws_restJson1.js +84 -70
- package/dist-types/SSO.d.ts +31 -13
- package/dist-types/SSOClient.d.ts +12 -9
- package/dist-types/commands/ListAccountRolesCommand.d.ts +1 -1
- package/dist-types/commands/ListAccountsCommand.d.ts +2 -2
- package/dist-types/commands/LogoutCommand.d.ts +16 -1
- package/dist-types/models/models_0.d.ts +27 -22
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-sso
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
7
37
|
|
|
8
38
|
|
package/README.md
CHANGED
|
@@ -9,21 +9,24 @@
|
|
|
9
9
|
|
|
10
10
|
AWS SDK for JavaScript SSO Client for Node.js, Browser and React Native.
|
|
11
11
|
|
|
12
|
-
<p>
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
<p>Amazon Web Services Single Sign On Portal is a web service that makes it easy for you to assign user access to
|
|
13
|
+
Amazon Web Services SSO resources such as the AWS access portal. Users can get Amazon Web Services account applications and roles
|
|
14
|
+
assigned to them and get federated into the application.</p>
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
Single Sign-On
|
|
16
|
+
<note>
|
|
17
|
+
<p>Although Amazon Web Services Single Sign-On was renamed, the <code>sso</code> and
|
|
18
|
+
<code>identitystore</code> API namespaces will continue to retain their original name for
|
|
19
|
+
backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">Amazon Web Services SSO rename</a>.</p>
|
|
20
|
+
</note>
|
|
18
21
|
|
|
19
|
-
<p>This API reference guide describes the
|
|
22
|
+
<p>This API reference guide describes the Amazon Web Services SSO Portal operations that you can call
|
|
20
23
|
programatically and includes detailed information on data types and errors.</p>
|
|
21
24
|
|
|
22
25
|
<note>
|
|
23
|
-
<p>
|
|
26
|
+
<p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
|
|
24
27
|
languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
|
|
25
|
-
convenient way to create programmatic access to
|
|
26
|
-
information about the
|
|
28
|
+
convenient way to create programmatic access to Amazon Web Services SSO and other Amazon Web Services services. For more
|
|
29
|
+
information about the Amazon Web Services SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
|
|
27
30
|
</note>
|
|
28
31
|
|
|
29
32
|
## Installing
|
|
@@ -180,7 +183,7 @@ try {
|
|
|
180
183
|
const data = await client.send(command);
|
|
181
184
|
// process data.
|
|
182
185
|
} catch (error) {
|
|
183
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
186
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
184
187
|
console.log({ requestId, cfId, extendedRequestId });
|
|
185
188
|
/**
|
|
186
189
|
* The keys within exceptions are also parsed.
|
|
@@ -7,14 +7,14 @@ const models_0_1 = require("../models/models_0");
|
|
|
7
7
|
const SSOServiceException_1 = require("../models/SSOServiceException");
|
|
8
8
|
const serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
-
const headers = {
|
|
11
|
-
|
|
12
|
-
};
|
|
10
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
11
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
12
|
+
});
|
|
13
13
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials";
|
|
14
|
-
const query = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
14
|
+
const query = map({
|
|
15
|
+
role_name: [, input.roleName],
|
|
16
|
+
account_id: [, input.accountId],
|
|
17
|
+
});
|
|
18
18
|
let body;
|
|
19
19
|
return new protocol_http_1.HttpRequest({
|
|
20
20
|
protocol,
|
|
@@ -30,15 +30,15 @@ const serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) =
|
|
|
30
30
|
exports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand;
|
|
31
31
|
const serializeAws_restJson1ListAccountRolesCommand = async (input, context) => {
|
|
32
32
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
-
const headers = {
|
|
34
|
-
|
|
35
|
-
};
|
|
33
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
34
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
35
|
+
});
|
|
36
36
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles";
|
|
37
|
-
const query = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
37
|
+
const query = map({
|
|
38
|
+
next_token: [, input.nextToken],
|
|
39
|
+
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
40
|
+
account_id: [, input.accountId],
|
|
41
|
+
});
|
|
42
42
|
let body;
|
|
43
43
|
return new protocol_http_1.HttpRequest({
|
|
44
44
|
protocol,
|
|
@@ -54,14 +54,14 @@ const serializeAws_restJson1ListAccountRolesCommand = async (input, context) =>
|
|
|
54
54
|
exports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand;
|
|
55
55
|
const serializeAws_restJson1ListAccountsCommand = async (input, context) => {
|
|
56
56
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
57
|
-
const headers = {
|
|
58
|
-
|
|
59
|
-
};
|
|
57
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
58
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
59
|
+
});
|
|
60
60
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts";
|
|
61
|
-
const query = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
61
|
+
const query = map({
|
|
62
|
+
next_token: [, input.nextToken],
|
|
63
|
+
max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
64
|
+
});
|
|
65
65
|
let body;
|
|
66
66
|
return new protocol_http_1.HttpRequest({
|
|
67
67
|
protocol,
|
|
@@ -77,9 +77,9 @@ const serializeAws_restJson1ListAccountsCommand = async (input, context) => {
|
|
|
77
77
|
exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand;
|
|
78
78
|
const serializeAws_restJson1LogoutCommand = async (input, context) => {
|
|
79
79
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
80
|
-
const headers = {
|
|
81
|
-
|
|
82
|
-
};
|
|
80
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
81
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
82
|
+
});
|
|
83
83
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logout";
|
|
84
84
|
let body;
|
|
85
85
|
return new protocol_http_1.HttpRequest({
|
|
@@ -97,15 +97,14 @@ const deserializeAws_restJson1GetRoleCredentialsCommand = async (output, context
|
|
|
97
97
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
98
98
|
return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context);
|
|
99
99
|
}
|
|
100
|
-
const contents = {
|
|
100
|
+
const contents = map({
|
|
101
101
|
$metadata: deserializeMetadata(output),
|
|
102
|
-
|
|
103
|
-
};
|
|
102
|
+
});
|
|
104
103
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
105
|
-
if (data.roleCredentials
|
|
104
|
+
if (data.roleCredentials != null) {
|
|
106
105
|
contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context);
|
|
107
106
|
}
|
|
108
|
-
return
|
|
107
|
+
return contents;
|
|
109
108
|
};
|
|
110
109
|
exports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand;
|
|
111
110
|
const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => {
|
|
@@ -113,7 +112,6 @@ const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, co
|
|
|
113
112
|
...output,
|
|
114
113
|
body: await parseBody(output.body, context),
|
|
115
114
|
};
|
|
116
|
-
let response;
|
|
117
115
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
118
116
|
switch (errorCode) {
|
|
119
117
|
case "InvalidRequestException":
|
|
@@ -130,33 +128,29 @@ const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, co
|
|
|
130
128
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
131
129
|
default:
|
|
132
130
|
const parsedBody = parsedOutput.body;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
$metadata,
|
|
131
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
132
|
+
output,
|
|
133
|
+
parsedBody,
|
|
134
|
+
exceptionCtor: SSOServiceException_1.SSOServiceException,
|
|
135
|
+
errorCode,
|
|
139
136
|
});
|
|
140
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
141
137
|
}
|
|
142
138
|
};
|
|
143
139
|
const deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => {
|
|
144
140
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
145
141
|
return deserializeAws_restJson1ListAccountRolesCommandError(output, context);
|
|
146
142
|
}
|
|
147
|
-
const contents = {
|
|
143
|
+
const contents = map({
|
|
148
144
|
$metadata: deserializeMetadata(output),
|
|
149
|
-
|
|
150
|
-
roleList: undefined,
|
|
151
|
-
};
|
|
145
|
+
});
|
|
152
146
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
153
|
-
if (data.nextToken
|
|
147
|
+
if (data.nextToken != null) {
|
|
154
148
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
155
149
|
}
|
|
156
|
-
if (data.roleList
|
|
150
|
+
if (data.roleList != null) {
|
|
157
151
|
contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context);
|
|
158
152
|
}
|
|
159
|
-
return
|
|
153
|
+
return contents;
|
|
160
154
|
};
|
|
161
155
|
exports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand;
|
|
162
156
|
const deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => {
|
|
@@ -164,7 +158,6 @@ const deserializeAws_restJson1ListAccountRolesCommandError = async (output, cont
|
|
|
164
158
|
...output,
|
|
165
159
|
body: await parseBody(output.body, context),
|
|
166
160
|
};
|
|
167
|
-
let response;
|
|
168
161
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
169
162
|
switch (errorCode) {
|
|
170
163
|
case "InvalidRequestException":
|
|
@@ -181,33 +174,29 @@ const deserializeAws_restJson1ListAccountRolesCommandError = async (output, cont
|
|
|
181
174
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
182
175
|
default:
|
|
183
176
|
const parsedBody = parsedOutput.body;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
$metadata,
|
|
177
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
178
|
+
output,
|
|
179
|
+
parsedBody,
|
|
180
|
+
exceptionCtor: SSOServiceException_1.SSOServiceException,
|
|
181
|
+
errorCode,
|
|
190
182
|
});
|
|
191
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
192
183
|
}
|
|
193
184
|
};
|
|
194
185
|
const deserializeAws_restJson1ListAccountsCommand = async (output, context) => {
|
|
195
186
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
196
187
|
return deserializeAws_restJson1ListAccountsCommandError(output, context);
|
|
197
188
|
}
|
|
198
|
-
const contents = {
|
|
189
|
+
const contents = map({
|
|
199
190
|
$metadata: deserializeMetadata(output),
|
|
200
|
-
|
|
201
|
-
nextToken: undefined,
|
|
202
|
-
};
|
|
191
|
+
});
|
|
203
192
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
204
|
-
if (data.accountList
|
|
193
|
+
if (data.accountList != null) {
|
|
205
194
|
contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context);
|
|
206
195
|
}
|
|
207
|
-
if (data.nextToken
|
|
196
|
+
if (data.nextToken != null) {
|
|
208
197
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
209
198
|
}
|
|
210
|
-
return
|
|
199
|
+
return contents;
|
|
211
200
|
};
|
|
212
201
|
exports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand;
|
|
213
202
|
const deserializeAws_restJson1ListAccountsCommandError = async (output, context) => {
|
|
@@ -215,7 +204,6 @@ const deserializeAws_restJson1ListAccountsCommandError = async (output, context)
|
|
|
215
204
|
...output,
|
|
216
205
|
body: await parseBody(output.body, context),
|
|
217
206
|
};
|
|
218
|
-
let response;
|
|
219
207
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
220
208
|
switch (errorCode) {
|
|
221
209
|
case "InvalidRequestException":
|
|
@@ -232,25 +220,23 @@ const deserializeAws_restJson1ListAccountsCommandError = async (output, context)
|
|
|
232
220
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
233
221
|
default:
|
|
234
222
|
const parsedBody = parsedOutput.body;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
$metadata,
|
|
223
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
224
|
+
output,
|
|
225
|
+
parsedBody,
|
|
226
|
+
exceptionCtor: SSOServiceException_1.SSOServiceException,
|
|
227
|
+
errorCode,
|
|
241
228
|
});
|
|
242
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
243
229
|
}
|
|
244
230
|
};
|
|
245
231
|
const deserializeAws_restJson1LogoutCommand = async (output, context) => {
|
|
246
232
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
247
233
|
return deserializeAws_restJson1LogoutCommandError(output, context);
|
|
248
234
|
}
|
|
249
|
-
const contents = {
|
|
235
|
+
const contents = map({
|
|
250
236
|
$metadata: deserializeMetadata(output),
|
|
251
|
-
};
|
|
237
|
+
});
|
|
252
238
|
await collectBody(output.body, context);
|
|
253
|
-
return
|
|
239
|
+
return contents;
|
|
254
240
|
};
|
|
255
241
|
exports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand;
|
|
256
242
|
const deserializeAws_restJson1LogoutCommandError = async (output, context) => {
|
|
@@ -258,7 +244,6 @@ const deserializeAws_restJson1LogoutCommandError = async (output, context) => {
|
|
|
258
244
|
...output,
|
|
259
245
|
body: await parseBody(output.body, context),
|
|
260
246
|
};
|
|
261
|
-
let response;
|
|
262
247
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
263
248
|
switch (errorCode) {
|
|
264
249
|
case "InvalidRequestException":
|
|
@@ -272,20 +257,19 @@ const deserializeAws_restJson1LogoutCommandError = async (output, context) => {
|
|
|
272
257
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
273
258
|
default:
|
|
274
259
|
const parsedBody = parsedOutput.body;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
$metadata,
|
|
260
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
261
|
+
output,
|
|
262
|
+
parsedBody,
|
|
263
|
+
exceptionCtor: SSOServiceException_1.SSOServiceException,
|
|
264
|
+
errorCode,
|
|
281
265
|
});
|
|
282
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
283
266
|
}
|
|
284
267
|
};
|
|
268
|
+
const map = smithy_client_1.map;
|
|
285
269
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
286
|
-
const contents = {};
|
|
270
|
+
const contents = map({});
|
|
287
271
|
const data = parsedOutput.body;
|
|
288
|
-
if (data.message
|
|
272
|
+
if (data.message != null) {
|
|
289
273
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
290
274
|
}
|
|
291
275
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -295,9 +279,9 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
295
279
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
296
280
|
};
|
|
297
281
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
298
|
-
const contents = {};
|
|
282
|
+
const contents = map({});
|
|
299
283
|
const data = parsedOutput.body;
|
|
300
|
-
if (data.message
|
|
284
|
+
if (data.message != null) {
|
|
301
285
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
302
286
|
}
|
|
303
287
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -307,9 +291,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
307
291
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
308
292
|
};
|
|
309
293
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
310
|
-
const contents = {};
|
|
294
|
+
const contents = map({});
|
|
311
295
|
const data = parsedOutput.body;
|
|
312
|
-
if (data.message
|
|
296
|
+
if (data.message != null) {
|
|
313
297
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
314
298
|
}
|
|
315
299
|
const exception = new models_0_1.TooManyRequestsException({
|
|
@@ -319,9 +303,9 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
319
303
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
320
304
|
};
|
|
321
305
|
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
322
|
-
const contents = {};
|
|
306
|
+
const contents = map({});
|
|
323
307
|
const data = parsedOutput.body;
|
|
324
|
-
if (data.message
|
|
308
|
+
if (data.message != null) {
|
|
325
309
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
326
310
|
}
|
|
327
311
|
const exception = new models_0_1.UnauthorizedException({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
|
|
5
5
|
import { SSOServiceException as __BaseException } from "../models/SSOServiceException";
|
|
6
6
|
export var serializeAws_restJson1GetRoleCredentialsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -10,9 +10,14 @@ export var serializeAws_restJson1GetRoleCredentialsCommand = function (input, co
|
|
|
10
10
|
case 0: return [4, context.endpoint()];
|
|
11
11
|
case 1:
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
-
headers =
|
|
13
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
14
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
15
|
+
});
|
|
14
16
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/federation/credentials";
|
|
15
|
-
query =
|
|
17
|
+
query = map({
|
|
18
|
+
role_name: [, input.roleName],
|
|
19
|
+
account_id: [, input.accountId],
|
|
20
|
+
});
|
|
16
21
|
return [2, new __HttpRequest({
|
|
17
22
|
protocol: protocol,
|
|
18
23
|
hostname: hostname,
|
|
@@ -33,9 +38,15 @@ export var serializeAws_restJson1ListAccountRolesCommand = function (input, cont
|
|
|
33
38
|
case 0: return [4, context.endpoint()];
|
|
34
39
|
case 1:
|
|
35
40
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
36
|
-
headers =
|
|
41
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
42
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
43
|
+
});
|
|
37
44
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/assignment/roles";
|
|
38
|
-
query =
|
|
45
|
+
query = map({
|
|
46
|
+
next_token: [, input.nextToken],
|
|
47
|
+
max_result: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
48
|
+
account_id: [, input.accountId],
|
|
49
|
+
});
|
|
39
50
|
return [2, new __HttpRequest({
|
|
40
51
|
protocol: protocol,
|
|
41
52
|
hostname: hostname,
|
|
@@ -56,9 +67,14 @@ export var serializeAws_restJson1ListAccountsCommand = function (input, context)
|
|
|
56
67
|
case 0: return [4, context.endpoint()];
|
|
57
68
|
case 1:
|
|
58
69
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
59
|
-
headers =
|
|
70
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
71
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
72
|
+
});
|
|
60
73
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/assignment/accounts";
|
|
61
|
-
query =
|
|
74
|
+
query = map({
|
|
75
|
+
next_token: [, input.nextToken],
|
|
76
|
+
max_result: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
77
|
+
});
|
|
62
78
|
return [2, new __HttpRequest({
|
|
63
79
|
protocol: protocol,
|
|
64
80
|
hostname: hostname,
|
|
@@ -79,7 +95,9 @@ export var serializeAws_restJson1LogoutCommand = function (input, context) { ret
|
|
|
79
95
|
case 0: return [4, context.endpoint()];
|
|
80
96
|
case 1:
|
|
81
97
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
82
|
-
headers =
|
|
98
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
99
|
+
"x-amz-sso_bearer_token": input.accessToken,
|
|
100
|
+
});
|
|
83
101
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/logout";
|
|
84
102
|
return [2, new __HttpRequest({
|
|
85
103
|
protocol: protocol,
|
|
@@ -101,24 +119,23 @@ export var deserializeAws_restJson1GetRoleCredentialsCommand = function (output,
|
|
|
101
119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
102
120
|
return [2, deserializeAws_restJson1GetRoleCredentialsCommandError(output, context)];
|
|
103
121
|
}
|
|
104
|
-
contents = {
|
|
122
|
+
contents = map({
|
|
105
123
|
$metadata: deserializeMetadata(output),
|
|
106
|
-
|
|
107
|
-
};
|
|
124
|
+
});
|
|
108
125
|
_a = __expectNonNull;
|
|
109
126
|
_b = __expectObject;
|
|
110
127
|
return [4, parseBody(output.body, context)];
|
|
111
128
|
case 1:
|
|
112
129
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
113
|
-
if (data.roleCredentials
|
|
130
|
+
if (data.roleCredentials != null) {
|
|
114
131
|
contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context);
|
|
115
132
|
}
|
|
116
|
-
return [2,
|
|
133
|
+
return [2, contents];
|
|
117
134
|
}
|
|
118
135
|
});
|
|
119
136
|
}); };
|
|
120
137
|
var deserializeAws_restJson1GetRoleCredentialsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
121
|
-
var parsedOutput, _a,
|
|
138
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
122
139
|
var _c;
|
|
123
140
|
return __generator(this, function (_d) {
|
|
124
141
|
switch (_d.label) {
|
|
@@ -151,14 +168,14 @@ var deserializeAws_restJson1GetRoleCredentialsCommandError = function (output, c
|
|
|
151
168
|
case 9: throw _d.sent();
|
|
152
169
|
case 10:
|
|
153
170
|
parsedBody = parsedOutput.body;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
$metadata: $metadata,
|
|
171
|
+
throwDefaultError({
|
|
172
|
+
output: output,
|
|
173
|
+
parsedBody: parsedBody,
|
|
174
|
+
exceptionCtor: __BaseException,
|
|
175
|
+
errorCode: errorCode,
|
|
160
176
|
});
|
|
161
|
-
|
|
177
|
+
_d.label = 11;
|
|
178
|
+
case 11: return [2];
|
|
162
179
|
}
|
|
163
180
|
});
|
|
164
181
|
}); };
|
|
@@ -170,28 +187,26 @@ export var deserializeAws_restJson1ListAccountRolesCommand = function (output, c
|
|
|
170
187
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
171
188
|
return [2, deserializeAws_restJson1ListAccountRolesCommandError(output, context)];
|
|
172
189
|
}
|
|
173
|
-
contents = {
|
|
190
|
+
contents = map({
|
|
174
191
|
$metadata: deserializeMetadata(output),
|
|
175
|
-
|
|
176
|
-
roleList: undefined,
|
|
177
|
-
};
|
|
192
|
+
});
|
|
178
193
|
_a = __expectNonNull;
|
|
179
194
|
_b = __expectObject;
|
|
180
195
|
return [4, parseBody(output.body, context)];
|
|
181
196
|
case 1:
|
|
182
197
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
183
|
-
if (data.nextToken
|
|
198
|
+
if (data.nextToken != null) {
|
|
184
199
|
contents.nextToken = __expectString(data.nextToken);
|
|
185
200
|
}
|
|
186
|
-
if (data.roleList
|
|
201
|
+
if (data.roleList != null) {
|
|
187
202
|
contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context);
|
|
188
203
|
}
|
|
189
|
-
return [2,
|
|
204
|
+
return [2, contents];
|
|
190
205
|
}
|
|
191
206
|
});
|
|
192
207
|
}); };
|
|
193
208
|
var deserializeAws_restJson1ListAccountRolesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
-
var parsedOutput, _a,
|
|
209
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
195
210
|
var _c;
|
|
196
211
|
return __generator(this, function (_d) {
|
|
197
212
|
switch (_d.label) {
|
|
@@ -224,14 +239,14 @@ var deserializeAws_restJson1ListAccountRolesCommandError = function (output, con
|
|
|
224
239
|
case 9: throw _d.sent();
|
|
225
240
|
case 10:
|
|
226
241
|
parsedBody = parsedOutput.body;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
$metadata: $metadata,
|
|
242
|
+
throwDefaultError({
|
|
243
|
+
output: output,
|
|
244
|
+
parsedBody: parsedBody,
|
|
245
|
+
exceptionCtor: __BaseException,
|
|
246
|
+
errorCode: errorCode,
|
|
233
247
|
});
|
|
234
|
-
|
|
248
|
+
_d.label = 11;
|
|
249
|
+
case 11: return [2];
|
|
235
250
|
}
|
|
236
251
|
});
|
|
237
252
|
}); };
|
|
@@ -243,28 +258,26 @@ export var deserializeAws_restJson1ListAccountsCommand = function (output, conte
|
|
|
243
258
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
244
259
|
return [2, deserializeAws_restJson1ListAccountsCommandError(output, context)];
|
|
245
260
|
}
|
|
246
|
-
contents = {
|
|
261
|
+
contents = map({
|
|
247
262
|
$metadata: deserializeMetadata(output),
|
|
248
|
-
|
|
249
|
-
nextToken: undefined,
|
|
250
|
-
};
|
|
263
|
+
});
|
|
251
264
|
_a = __expectNonNull;
|
|
252
265
|
_b = __expectObject;
|
|
253
266
|
return [4, parseBody(output.body, context)];
|
|
254
267
|
case 1:
|
|
255
268
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
256
|
-
if (data.accountList
|
|
269
|
+
if (data.accountList != null) {
|
|
257
270
|
contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context);
|
|
258
271
|
}
|
|
259
|
-
if (data.nextToken
|
|
272
|
+
if (data.nextToken != null) {
|
|
260
273
|
contents.nextToken = __expectString(data.nextToken);
|
|
261
274
|
}
|
|
262
|
-
return [2,
|
|
275
|
+
return [2, contents];
|
|
263
276
|
}
|
|
264
277
|
});
|
|
265
278
|
}); };
|
|
266
279
|
var deserializeAws_restJson1ListAccountsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
267
|
-
var parsedOutput, _a,
|
|
280
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
268
281
|
var _c;
|
|
269
282
|
return __generator(this, function (_d) {
|
|
270
283
|
switch (_d.label) {
|
|
@@ -297,14 +310,14 @@ var deserializeAws_restJson1ListAccountsCommandError = function (output, context
|
|
|
297
310
|
case 9: throw _d.sent();
|
|
298
311
|
case 10:
|
|
299
312
|
parsedBody = parsedOutput.body;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
$metadata: $metadata,
|
|
313
|
+
throwDefaultError({
|
|
314
|
+
output: output,
|
|
315
|
+
parsedBody: parsedBody,
|
|
316
|
+
exceptionCtor: __BaseException,
|
|
317
|
+
errorCode: errorCode,
|
|
306
318
|
});
|
|
307
|
-
|
|
319
|
+
_d.label = 11;
|
|
320
|
+
case 11: return [2];
|
|
308
321
|
}
|
|
309
322
|
});
|
|
310
323
|
}); };
|
|
@@ -316,18 +329,18 @@ export var deserializeAws_restJson1LogoutCommand = function (output, context) {
|
|
|
316
329
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
330
|
return [2, deserializeAws_restJson1LogoutCommandError(output, context)];
|
|
318
331
|
}
|
|
319
|
-
contents = {
|
|
332
|
+
contents = map({
|
|
320
333
|
$metadata: deserializeMetadata(output),
|
|
321
|
-
};
|
|
334
|
+
});
|
|
322
335
|
return [4, collectBody(output.body, context)];
|
|
323
336
|
case 1:
|
|
324
337
|
_a.sent();
|
|
325
|
-
return [2,
|
|
338
|
+
return [2, contents];
|
|
326
339
|
}
|
|
327
340
|
});
|
|
328
341
|
}); };
|
|
329
342
|
var deserializeAws_restJson1LogoutCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
330
|
-
var parsedOutput, _a,
|
|
343
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
331
344
|
var _c;
|
|
332
345
|
return __generator(this, function (_d) {
|
|
333
346
|
switch (_d.label) {
|
|
@@ -356,23 +369,24 @@ var deserializeAws_restJson1LogoutCommandError = function (output, context) { re
|
|
|
356
369
|
case 7: throw _d.sent();
|
|
357
370
|
case 8:
|
|
358
371
|
parsedBody = parsedOutput.body;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
$metadata: $metadata,
|
|
372
|
+
throwDefaultError({
|
|
373
|
+
output: output,
|
|
374
|
+
parsedBody: parsedBody,
|
|
375
|
+
exceptionCtor: __BaseException,
|
|
376
|
+
errorCode: errorCode,
|
|
365
377
|
});
|
|
366
|
-
|
|
378
|
+
_d.label = 9;
|
|
379
|
+
case 9: return [2];
|
|
367
380
|
}
|
|
368
381
|
});
|
|
369
382
|
}); };
|
|
383
|
+
var map = __map;
|
|
370
384
|
var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
371
385
|
var contents, data, exception;
|
|
372
386
|
return __generator(this, function (_a) {
|
|
373
|
-
contents = {};
|
|
387
|
+
contents = map({});
|
|
374
388
|
data = parsedOutput.body;
|
|
375
|
-
if (data.message
|
|
389
|
+
if (data.message != null) {
|
|
376
390
|
contents.message = __expectString(data.message);
|
|
377
391
|
}
|
|
378
392
|
exception = new InvalidRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -382,9 +396,9 @@ var deserializeAws_restJson1InvalidRequestExceptionResponse = function (parsedOu
|
|
|
382
396
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
383
397
|
var contents, data, exception;
|
|
384
398
|
return __generator(this, function (_a) {
|
|
385
|
-
contents = {};
|
|
399
|
+
contents = map({});
|
|
386
400
|
data = parsedOutput.body;
|
|
387
|
-
if (data.message
|
|
401
|
+
if (data.message != null) {
|
|
388
402
|
contents.message = __expectString(data.message);
|
|
389
403
|
}
|
|
390
404
|
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -394,9 +408,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
|
|
|
394
408
|
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
395
409
|
var contents, data, exception;
|
|
396
410
|
return __generator(this, function (_a) {
|
|
397
|
-
contents = {};
|
|
411
|
+
contents = map({});
|
|
398
412
|
data = parsedOutput.body;
|
|
399
|
-
if (data.message
|
|
413
|
+
if (data.message != null) {
|
|
400
414
|
contents.message = __expectString(data.message);
|
|
401
415
|
}
|
|
402
416
|
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -406,9 +420,9 @@ var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedO
|
|
|
406
420
|
var deserializeAws_restJson1UnauthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
407
421
|
var contents, data, exception;
|
|
408
422
|
return __generator(this, function (_a) {
|
|
409
|
-
contents = {};
|
|
423
|
+
contents = map({});
|
|
410
424
|
data = parsedOutput.body;
|
|
411
|
-
if (data.message
|
|
425
|
+
if (data.message != null) {
|
|
412
426
|
contents.message = __expectString(data.message);
|
|
413
427
|
}
|
|
414
428
|
exception = new UnauthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
package/dist-types/SSO.d.ts
CHANGED
|
@@ -5,21 +5,24 @@ import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/
|
|
|
5
5
|
import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
|
|
6
6
|
import { SSOClient } from "./SSOClient";
|
|
7
7
|
/**
|
|
8
|
-
* <p>
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* <p>Amazon Web Services Single Sign On Portal is a web service that makes it easy for you to assign user access to
|
|
9
|
+
* Amazon Web Services SSO resources such as the AWS access portal. Users can get Amazon Web Services account applications and roles
|
|
10
|
+
* assigned to them and get federated into the application.</p>
|
|
11
11
|
*
|
|
12
|
-
* <
|
|
13
|
-
*
|
|
12
|
+
* <note>
|
|
13
|
+
* <p>Although Amazon Web Services Single Sign-On was renamed, the <code>sso</code> and
|
|
14
|
+
* <code>identitystore</code> API namespaces will continue to retain their original name for
|
|
15
|
+
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">Amazon Web Services SSO rename</a>.</p>
|
|
16
|
+
* </note>
|
|
14
17
|
*
|
|
15
|
-
* <p>This API reference guide describes the
|
|
18
|
+
* <p>This API reference guide describes the Amazon Web Services SSO Portal operations that you can call
|
|
16
19
|
* programatically and includes detailed information on data types and errors.</p>
|
|
17
20
|
*
|
|
18
21
|
* <note>
|
|
19
|
-
* <p>
|
|
22
|
+
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
|
|
20
23
|
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
|
|
21
|
-
* convenient way to create programmatic access to
|
|
22
|
-
* information about the
|
|
24
|
+
* convenient way to create programmatic access to Amazon Web Services SSO and other Amazon Web Services services. For more
|
|
25
|
+
* information about the Amazon Web Services SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
|
|
23
26
|
* </note>
|
|
24
27
|
*/
|
|
25
28
|
export declare class SSO extends SSOClient {
|
|
@@ -31,21 +34,36 @@ export declare class SSO extends SSOClient {
|
|
|
31
34
|
getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
|
|
32
35
|
getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
|
|
33
36
|
/**
|
|
34
|
-
* <p>Lists all roles that are assigned to the user for a given
|
|
37
|
+
* <p>Lists all roles that are assigned to the user for a given Amazon Web Services account.</p>
|
|
35
38
|
*/
|
|
36
39
|
listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountRolesCommandOutput>;
|
|
37
40
|
listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
|
|
38
41
|
listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
|
|
39
42
|
/**
|
|
40
|
-
* <p>Lists all
|
|
41
|
-
* 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>
|
|
43
|
+
* <p>Lists all Amazon Web Services accounts assigned to the user. These Amazon Web Services accounts are assigned by the
|
|
44
|
+
* 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>Amazon Web Services SSO User Guide</i>. This operation
|
|
42
45
|
* returns a paginated response.</p>
|
|
43
46
|
*/
|
|
44
47
|
listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountsCommandOutput>;
|
|
45
48
|
listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
|
|
46
49
|
listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
|
|
47
50
|
/**
|
|
48
|
-
* <p>Removes the
|
|
51
|
+
* <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to
|
|
52
|
+
* the Amazon Web Services SSO service to invalidate the corresponding server-side Amazon Web Services SSO sign in
|
|
53
|
+
* session.</p>
|
|
54
|
+
*
|
|
55
|
+
* <note>
|
|
56
|
+
* <p>If a user uses Amazon Web Services SSO to access the AWS CLI, the user’s Amazon Web Services SSO sign in session is
|
|
57
|
+
* used to obtain an IAM session, as specified in the corresponding Amazon Web Services SSO permission set.
|
|
58
|
+
* More specifically, Amazon Web Services SSO assumes an IAM role in the target account on behalf of the user,
|
|
59
|
+
* and the corresponding temporary Amazon Web Services credentials are returned to the client.</p>
|
|
60
|
+
*
|
|
61
|
+
* <p>After user logout, any existing IAM role sessions that were created by using Amazon Web Services SSO
|
|
62
|
+
* permission sets continue based on the duration configured in the permission set.
|
|
63
|
+
* For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User
|
|
64
|
+
* authentications</a> in the <i>Amazon Web Services SSO User
|
|
65
|
+
* Guide</i>.</p>
|
|
66
|
+
* </note>
|
|
49
67
|
*/
|
|
50
68
|
logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
|
|
51
69
|
logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
|
|
@@ -124,21 +124,24 @@ declare type SSOClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpH
|
|
|
124
124
|
export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
* <p>
|
|
128
|
-
*
|
|
129
|
-
*
|
|
127
|
+
* <p>Amazon Web Services Single Sign On Portal is a web service that makes it easy for you to assign user access to
|
|
128
|
+
* Amazon Web Services SSO resources such as the AWS access portal. Users can get Amazon Web Services account applications and roles
|
|
129
|
+
* assigned to them and get federated into the application.</p>
|
|
130
130
|
*
|
|
131
|
-
* <
|
|
132
|
-
*
|
|
131
|
+
* <note>
|
|
132
|
+
* <p>Although Amazon Web Services Single Sign-On was renamed, the <code>sso</code> and
|
|
133
|
+
* <code>identitystore</code> API namespaces will continue to retain their original name for
|
|
134
|
+
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">Amazon Web Services SSO rename</a>.</p>
|
|
135
|
+
* </note>
|
|
133
136
|
*
|
|
134
|
-
* <p>This API reference guide describes the
|
|
137
|
+
* <p>This API reference guide describes the Amazon Web Services SSO Portal operations that you can call
|
|
135
138
|
* programatically and includes detailed information on data types and errors.</p>
|
|
136
139
|
*
|
|
137
140
|
* <note>
|
|
138
|
-
* <p>
|
|
141
|
+
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
|
|
139
142
|
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
|
|
140
|
-
* convenient way to create programmatic access to
|
|
141
|
-
* information about the
|
|
143
|
+
* convenient way to create programmatic access to Amazon Web Services SSO and other Amazon Web Services services. For more
|
|
144
|
+
* information about the Amazon Web Services SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
|
|
142
145
|
* </note>
|
|
143
146
|
*/
|
|
144
147
|
export declare class SSOClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig> {
|
|
@@ -7,7 +7,7 @@ export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {
|
|
|
7
7
|
export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* <p>Lists all roles that are assigned to the user for a given
|
|
10
|
+
* <p>Lists all roles that are assigned to the user for a given Amazon Web Services account.</p>
|
|
11
11
|
* @example
|
|
12
12
|
* Use a bare-bones client and the command you need to make an API call.
|
|
13
13
|
* ```javascript
|
|
@@ -7,8 +7,8 @@ export interface ListAccountsCommandInput extends ListAccountsRequest {
|
|
|
7
7
|
export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* <p>Lists all
|
|
11
|
-
* 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>
|
|
10
|
+
* <p>Lists all Amazon Web Services accounts assigned to the user. These Amazon Web Services accounts are assigned by the
|
|
11
|
+
* 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>Amazon Web Services SSO User Guide</i>. This operation
|
|
12
12
|
* returns a paginated response.</p>
|
|
13
13
|
* @example
|
|
14
14
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -7,7 +7,22 @@ export interface LogoutCommandInput extends LogoutRequest {
|
|
|
7
7
|
export interface LogoutCommandOutput extends __MetadataBearer {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* <p>Removes the
|
|
10
|
+
* <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to
|
|
11
|
+
* the Amazon Web Services SSO service to invalidate the corresponding server-side Amazon Web Services SSO sign in
|
|
12
|
+
* session.</p>
|
|
13
|
+
*
|
|
14
|
+
* <note>
|
|
15
|
+
* <p>If a user uses Amazon Web Services SSO to access the AWS CLI, the user’s Amazon Web Services SSO sign in session is
|
|
16
|
+
* used to obtain an IAM session, as specified in the corresponding Amazon Web Services SSO permission set.
|
|
17
|
+
* More specifically, Amazon Web Services SSO assumes an IAM role in the target account on behalf of the user,
|
|
18
|
+
* and the corresponding temporary Amazon Web Services credentials are returned to the client.</p>
|
|
19
|
+
*
|
|
20
|
+
* <p>After user logout, any existing IAM role sessions that were created by using Amazon Web Services SSO
|
|
21
|
+
* permission sets continue based on the duration configured in the permission set.
|
|
22
|
+
* For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User
|
|
23
|
+
* authentications</a> in the <i>Amazon Web Services SSO User
|
|
24
|
+
* Guide</i>.</p>
|
|
25
|
+
* </note>
|
|
11
26
|
* @example
|
|
12
27
|
* Use a bare-bones client and the command you need to make an API call.
|
|
13
28
|
* ```javascript
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
2
2
|
import { SSOServiceException as __BaseException } from "./SSOServiceException";
|
|
3
3
|
/**
|
|
4
|
-
* <p>Provides information about your
|
|
4
|
+
* <p>Provides information about your Amazon Web Services account.</p>
|
|
5
5
|
*/
|
|
6
6
|
export interface AccountInfo {
|
|
7
7
|
/**
|
|
8
|
-
* <p>The identifier of the
|
|
8
|
+
* <p>The identifier of the Amazon Web Services account that is assigned to the user.</p>
|
|
9
9
|
*/
|
|
10
10
|
accountId?: string;
|
|
11
11
|
/**
|
|
12
|
-
* <p>The display name of the
|
|
12
|
+
* <p>The display name of the Amazon Web Services account that is assigned to the user.</p>
|
|
13
13
|
*/
|
|
14
14
|
accountName?: string;
|
|
15
15
|
/**
|
|
16
|
-
* <p>The email address of the
|
|
16
|
+
* <p>The email address of the Amazon Web Services account that is assigned to the user.</p>
|
|
17
17
|
*/
|
|
18
18
|
emailAddress?: string;
|
|
19
19
|
}
|
|
@@ -23,12 +23,12 @@ export interface GetRoleCredentialsRequest {
|
|
|
23
23
|
*/
|
|
24
24
|
roleName: string | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* <p>The identifier for the
|
|
26
|
+
* <p>The identifier for the Amazon Web Services account that is assigned to the user.</p>
|
|
27
27
|
*/
|
|
28
28
|
accountId: string | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
31
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>
|
|
31
|
+
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>Amazon Web Services SSO OIDC API Reference Guide</i>.</p>
|
|
32
32
|
*/
|
|
33
33
|
accessToken: string | undefined;
|
|
34
34
|
}
|
|
@@ -38,18 +38,18 @@ export interface GetRoleCredentialsRequest {
|
|
|
38
38
|
export interface RoleCredentials {
|
|
39
39
|
/**
|
|
40
40
|
* <p>The identifier used for the temporary security credentials. For more information, see
|
|
41
|
-
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to
|
|
42
|
-
* <i>
|
|
41
|
+
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to Amazon Web Services Resources</a> in the
|
|
42
|
+
* <i>Amazon Web Services IAM User Guide</i>.</p>
|
|
43
43
|
*/
|
|
44
44
|
accessKeyId?: string;
|
|
45
45
|
/**
|
|
46
|
-
* <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
|
|
47
|
-
* <i>
|
|
46
|
+
* <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 Amazon Web Services Resources</a> in the
|
|
47
|
+
* <i>Amazon Web Services IAM User Guide</i>.</p>
|
|
48
48
|
*/
|
|
49
49
|
secretAccessKey?: string;
|
|
50
50
|
/**
|
|
51
|
-
* <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
|
|
52
|
-
* <i>
|
|
51
|
+
* <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 Amazon Web Services Resources</a> in the
|
|
52
|
+
* <i>Amazon Web Services IAM User Guide</i>.</p>
|
|
53
53
|
*/
|
|
54
54
|
sessionToken?: string;
|
|
55
55
|
/**
|
|
@@ -87,7 +87,8 @@ export declare class ResourceNotFoundException extends __BaseException {
|
|
|
87
87
|
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* <p>Indicates that the request is being made too frequently and is more than what the server
|
|
90
|
+
* <p>Indicates that the request is being made too frequently and is more than what the server
|
|
91
|
+
* can handle.</p>
|
|
91
92
|
*/
|
|
92
93
|
export declare class TooManyRequestsException extends __BaseException {
|
|
93
94
|
readonly name: "TooManyRequestsException";
|
|
@@ -98,7 +99,8 @@ export declare class TooManyRequestsException extends __BaseException {
|
|
|
98
99
|
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
|
|
99
100
|
}
|
|
100
101
|
/**
|
|
101
|
-
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
|
|
102
|
+
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
|
|
103
|
+
* token in the request.</p>
|
|
102
104
|
*/
|
|
103
105
|
export declare class UnauthorizedException extends __BaseException {
|
|
104
106
|
readonly name: "UnauthorizedException";
|
|
@@ -119,11 +121,11 @@ export interface ListAccountRolesRequest {
|
|
|
119
121
|
maxResults?: number;
|
|
120
122
|
/**
|
|
121
123
|
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
122
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>
|
|
124
|
+
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>Amazon Web Services SSO OIDC API Reference Guide</i>.</p>
|
|
123
125
|
*/
|
|
124
126
|
accessToken: string | undefined;
|
|
125
127
|
/**
|
|
126
|
-
* <p>The identifier for the
|
|
128
|
+
* <p>The identifier for the Amazon Web Services account that is assigned to the user.</p>
|
|
127
129
|
*/
|
|
128
130
|
accountId: string | undefined;
|
|
129
131
|
}
|
|
@@ -136,7 +138,7 @@ export interface RoleInfo {
|
|
|
136
138
|
*/
|
|
137
139
|
roleName?: string;
|
|
138
140
|
/**
|
|
139
|
-
* <p>The identifier of the
|
|
141
|
+
* <p>The identifier of the Amazon Web Services account assigned to the user.</p>
|
|
140
142
|
*/
|
|
141
143
|
accountId?: string;
|
|
142
144
|
}
|
|
@@ -146,13 +148,15 @@ export interface ListAccountRolesResponse {
|
|
|
146
148
|
*/
|
|
147
149
|
nextToken?: string;
|
|
148
150
|
/**
|
|
149
|
-
* <p>A paginated response with the list of roles and the next token if more results are
|
|
151
|
+
* <p>A paginated response with the list of roles and the next token if more results are
|
|
152
|
+
* available.</p>
|
|
150
153
|
*/
|
|
151
154
|
roleList?: RoleInfo[];
|
|
152
155
|
}
|
|
153
156
|
export interface ListAccountsRequest {
|
|
154
157
|
/**
|
|
155
|
-
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous
|
|
158
|
+
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous
|
|
159
|
+
* response output.</p>
|
|
156
160
|
*/
|
|
157
161
|
nextToken?: string;
|
|
158
162
|
/**
|
|
@@ -161,7 +165,7 @@ export interface ListAccountsRequest {
|
|
|
161
165
|
maxResults?: number;
|
|
162
166
|
/**
|
|
163
167
|
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
164
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>
|
|
168
|
+
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>Amazon Web Services SSO OIDC API Reference Guide</i>.</p>
|
|
165
169
|
*/
|
|
166
170
|
accessToken: string | undefined;
|
|
167
171
|
}
|
|
@@ -171,14 +175,15 @@ export interface ListAccountsResponse {
|
|
|
171
175
|
*/
|
|
172
176
|
nextToken?: string;
|
|
173
177
|
/**
|
|
174
|
-
* <p>A paginated response with the list of account information and the next token if more
|
|
178
|
+
* <p>A paginated response with the list of account information and the next token if more
|
|
179
|
+
* results are available.</p>
|
|
175
180
|
*/
|
|
176
181
|
accountList?: AccountInfo[];
|
|
177
182
|
}
|
|
178
183
|
export interface LogoutRequest {
|
|
179
184
|
/**
|
|
180
185
|
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
181
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>
|
|
186
|
+
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>Amazon Web Services SSO OIDC API Reference Guide</i>.</p>
|
|
182
187
|
*/
|
|
183
188
|
accessToken: string | undefined;
|
|
184
189
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sso",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.145.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
34
34
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
35
35
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
36
|
-
"@aws-sdk/smithy-client": "3.
|
|
36
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
37
37
|
"@aws-sdk/types": "3.127.0",
|
|
38
38
|
"@aws-sdk/url-parser": "3.127.0",
|
|
39
39
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
40
40
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
41
41
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
42
42
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
43
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
44
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
43
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
44
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
45
45
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
46
46
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
47
47
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
@@ -58,6 +58,11 @@
|
|
|
58
58
|
"typedoc": "0.19.2",
|
|
59
59
|
"typescript": "~4.6.2"
|
|
60
60
|
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"typedoc": {
|
|
63
|
+
"typescript": "~4.6.2"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
61
66
|
"engines": {
|
|
62
67
|
"node": ">=12.0.0"
|
|
63
68
|
},
|