@aws-sdk/client-sso 3.131.0 → 3.142.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 +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/GetRoleCredentialsCommand.js +2 -2
- package/dist-cjs/commands/ListAccountRolesCommand.js +2 -2
- package/dist-cjs/commands/ListAccountsCommand.js +2 -2
- package/dist-cjs/commands/LogoutCommand.js +1 -1
- package/dist-cjs/models/models_0.js +48 -68
- package/dist-cjs/protocols/Aws_restJson1.js +71 -87
- package/dist-es/commands/GetRoleCredentialsCommand.js +3 -3
- package/dist-es/commands/ListAccountRolesCommand.js +3 -3
- package/dist-es/commands/ListAccountsCommand.js +3 -3
- package/dist-es/commands/LogoutCommand.js +2 -2
- package/dist-es/models/models_0.js +10 -40
- package/dist-es/protocols/Aws_restJson1.js +84 -70
- package/dist-types/models/models_0.d.ts +40 -60
- package/dist-types/ts3.4/models/models_0.d.ts +20 -40
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **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))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @aws-sdk/client-sso
|
package/README.md
CHANGED
|
@@ -180,7 +180,7 @@ try {
|
|
|
180
180
|
const data = await client.send(command);
|
|
181
181
|
// process data.
|
|
182
182
|
} catch (error) {
|
|
183
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
183
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
184
184
|
console.log({ requestId, cfId, extendedRequestId });
|
|
185
185
|
/**
|
|
186
186
|
* The keys within exceptions are also parsed.
|
|
@@ -20,8 +20,8 @@ class GetRoleCredentialsCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class ListAccountRolesCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.ListAccountRolesResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class ListAccountsCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.ListAccountsResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,7 +20,7 @@ class LogoutCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog,
|
|
24
24
|
outputFilterSensitiveLog: (output) => output,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsResponseFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesResponseFilterSensitiveLog = exports.RoleInfoFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.AccountInfoFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const SSOServiceException_1 = require("./SSOServiceException");
|
|
6
|
-
var AccountInfo;
|
|
7
|
-
(function (AccountInfo) {
|
|
8
|
-
AccountInfo.filterSensitiveLog = (obj) => ({
|
|
9
|
-
...obj,
|
|
10
|
-
});
|
|
11
|
-
})(AccountInfo = exports.AccountInfo || (exports.AccountInfo = {}));
|
|
12
|
-
var GetRoleCredentialsRequest;
|
|
13
|
-
(function (GetRoleCredentialsRequest) {
|
|
14
|
-
GetRoleCredentialsRequest.filterSensitiveLog = (obj) => ({
|
|
15
|
-
...obj,
|
|
16
|
-
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
17
|
-
});
|
|
18
|
-
})(GetRoleCredentialsRequest = exports.GetRoleCredentialsRequest || (exports.GetRoleCredentialsRequest = {}));
|
|
19
|
-
var RoleCredentials;
|
|
20
|
-
(function (RoleCredentials) {
|
|
21
|
-
RoleCredentials.filterSensitiveLog = (obj) => ({
|
|
22
|
-
...obj,
|
|
23
|
-
...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }),
|
|
24
|
-
...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }),
|
|
25
|
-
});
|
|
26
|
-
})(RoleCredentials = exports.RoleCredentials || (exports.RoleCredentials = {}));
|
|
27
|
-
var GetRoleCredentialsResponse;
|
|
28
|
-
(function (GetRoleCredentialsResponse) {
|
|
29
|
-
GetRoleCredentialsResponse.filterSensitiveLog = (obj) => ({
|
|
30
|
-
...obj,
|
|
31
|
-
...(obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }),
|
|
32
|
-
});
|
|
33
|
-
})(GetRoleCredentialsResponse = exports.GetRoleCredentialsResponse || (exports.GetRoleCredentialsResponse = {}));
|
|
34
6
|
class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
|
|
35
7
|
constructor(opts) {
|
|
36
8
|
super({
|
|
@@ -83,42 +55,50 @@ class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
|
|
|
83
55
|
}
|
|
84
56
|
}
|
|
85
57
|
exports.UnauthorizedException = UnauthorizedException;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
58
|
+
const AccountInfoFilterSensitiveLog = (obj) => ({
|
|
59
|
+
...obj,
|
|
60
|
+
});
|
|
61
|
+
exports.AccountInfoFilterSensitiveLog = AccountInfoFilterSensitiveLog;
|
|
62
|
+
const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({
|
|
63
|
+
...obj,
|
|
64
|
+
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
65
|
+
});
|
|
66
|
+
exports.GetRoleCredentialsRequestFilterSensitiveLog = GetRoleCredentialsRequestFilterSensitiveLog;
|
|
67
|
+
const RoleCredentialsFilterSensitiveLog = (obj) => ({
|
|
68
|
+
...obj,
|
|
69
|
+
...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }),
|
|
70
|
+
...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }),
|
|
71
|
+
});
|
|
72
|
+
exports.RoleCredentialsFilterSensitiveLog = RoleCredentialsFilterSensitiveLog;
|
|
73
|
+
const GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({
|
|
74
|
+
...obj,
|
|
75
|
+
...(obj.roleCredentials && { roleCredentials: (0, exports.RoleCredentialsFilterSensitiveLog)(obj.roleCredentials) }),
|
|
76
|
+
});
|
|
77
|
+
exports.GetRoleCredentialsResponseFilterSensitiveLog = GetRoleCredentialsResponseFilterSensitiveLog;
|
|
78
|
+
const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({
|
|
79
|
+
...obj,
|
|
80
|
+
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
81
|
+
});
|
|
82
|
+
exports.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog;
|
|
83
|
+
const RoleInfoFilterSensitiveLog = (obj) => ({
|
|
84
|
+
...obj,
|
|
85
|
+
});
|
|
86
|
+
exports.RoleInfoFilterSensitiveLog = RoleInfoFilterSensitiveLog;
|
|
87
|
+
const ListAccountRolesResponseFilterSensitiveLog = (obj) => ({
|
|
88
|
+
...obj,
|
|
89
|
+
});
|
|
90
|
+
exports.ListAccountRolesResponseFilterSensitiveLog = ListAccountRolesResponseFilterSensitiveLog;
|
|
91
|
+
const ListAccountsRequestFilterSensitiveLog = (obj) => ({
|
|
92
|
+
...obj,
|
|
93
|
+
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
94
|
+
});
|
|
95
|
+
exports.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog;
|
|
96
|
+
const ListAccountsResponseFilterSensitiveLog = (obj) => ({
|
|
97
|
+
...obj,
|
|
98
|
+
});
|
|
99
|
+
exports.ListAccountsResponseFilterSensitiveLog = ListAccountsResponseFilterSensitiveLog;
|
|
100
|
+
const LogoutRequestFilterSensitiveLog = (obj) => ({
|
|
101
|
+
...obj,
|
|
102
|
+
...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }),
|
|
103
|
+
});
|
|
104
|
+
exports.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog;
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1GetRoleCredentialsCommand, serializeAws_restJson1GetRoleCredentialsCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var GetRoleCredentialsCommand = (function (_super) {
|
|
7
7
|
__extends(GetRoleCredentialsCommand, _super);
|
|
@@ -20,8 +20,8 @@ var GetRoleCredentialsCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: GetRoleCredentialsRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetRoleCredentialsResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { ListAccountRolesRequestFilterSensitiveLog, ListAccountRolesResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1ListAccountRolesCommand, serializeAws_restJson1ListAccountRolesCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var ListAccountRolesCommand = (function (_super) {
|
|
7
7
|
__extends(ListAccountRolesCommand, _super);
|
|
@@ -20,8 +20,8 @@ var ListAccountRolesCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: ListAccountRolesRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: ListAccountRolesResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { ListAccountsRequestFilterSensitiveLog, ListAccountsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1ListAccountsCommand, serializeAws_restJson1ListAccountsCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var ListAccountsCommand = (function (_super) {
|
|
7
7
|
__extends(ListAccountsCommand, _super);
|
|
@@ -20,8 +20,8 @@ var ListAccountsCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: ListAccountsRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: ListAccountsResponseFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { LogoutRequestFilterSensitiveLog } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1LogoutCommand, serializeAws_restJson1LogoutCommand } from "../protocols/Aws_restJson1";
|
|
6
6
|
var LogoutCommand = (function (_super) {
|
|
7
7
|
__extends(LogoutCommand, _super);
|
|
@@ -20,7 +20,7 @@ var LogoutCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: LogoutRequestFilterSensitiveLog,
|
|
24
24
|
outputFilterSensitiveLog: function (output) { return output; },
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|