@aws-sdk/client-sso 3.35.0 → 3.36.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 +13 -0
- package/dist-cjs/SSO.js +0 -1
- package/dist-cjs/SSOClient.js +0 -1
- package/dist-cjs/commands/GetRoleCredentialsCommand.js +0 -1
- package/dist-cjs/commands/ListAccountRolesCommand.js +0 -1
- package/dist-cjs/commands/ListAccountsCommand.js +0 -1
- package/dist-cjs/commands/LogoutCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListAccountRolesPaginator.js +0 -1
- package/dist-cjs/pagination/ListAccountsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/SSO.js +0 -1
- package/dist-es/SSOClient.js +0 -1
- package/dist-es/commands/GetRoleCredentialsCommand.js +0 -1
- package/dist-es/commands/ListAccountRolesCommand.js +0 -1
- package/dist-es/commands/ListAccountsCommand.js +0 -1
- package/dist-es/commands/LogoutCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListAccountRolesPaginator.js +0 -1
- package/dist-es/pagination/ListAccountsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +30 -27
- package/dist-cjs/SSO.js.map +0 -1
- package/dist-cjs/SSOClient.js.map +0 -1
- package/dist-cjs/commands/GetRoleCredentialsCommand.js.map +0 -1
- package/dist-cjs/commands/ListAccountRolesCommand.js.map +0 -1
- package/dist-cjs/commands/ListAccountsCommand.js.map +0 -1
- package/dist-cjs/commands/LogoutCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListAccountRolesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListAccountsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/SSO.js.map +0 -1
- package/dist-es/SSOClient.js.map +0 -1
- package/dist-es/commands/GetRoleCredentialsCommand.js.map +0 -1
- package/dist-es/commands/ListAccountRolesCommand.js.map +0 -1
- package/dist-es/commands/ListAccountsCommand.js.map +0 -1
- package/dist-es/commands/LogoutCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListAccountRolesPaginator.js.map +0 -1
- package/dist-es/pagination/ListAccountsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/SSO.ts +0 -161
- package/src/SSOClient.ts +0 -246
- package/src/commands/GetRoleCredentialsCommand.ts +0 -96
- package/src/commands/ListAccountRolesCommand.ts +0 -95
- package/src/commands/ListAccountsCommand.ts +0 -97
- package/src/commands/LogoutCommand.ts +0 -88
- package/src/endpoints.ts +0 -94
- package/src/index.ts +0 -10
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -334
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListAccountRolesPaginator.ts +0 -59
- package/src/pagination/ListAccountsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -623
- package/src/runtimeConfig.browser.ts +0 -39
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -42
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
package/src/models/models_0.ts
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
2
|
-
import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* <p>Provides information about your AWS account.</p>
|
|
6
|
-
*/
|
|
7
|
-
export interface AccountInfo {
|
|
8
|
-
/**
|
|
9
|
-
* <p>The identifier of the AWS account that is assigned to the user.</p>
|
|
10
|
-
*/
|
|
11
|
-
accountId?: string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* <p>The display name of the AWS account that is assigned to the user.</p>
|
|
15
|
-
*/
|
|
16
|
-
accountName?: string;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* <p>The email address of the AWS account that is assigned to the user.</p>
|
|
20
|
-
*/
|
|
21
|
-
emailAddress?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export namespace AccountInfo {
|
|
25
|
-
/**
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
export const filterSensitiveLog = (obj: AccountInfo): any => ({
|
|
29
|
-
...obj,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface GetRoleCredentialsRequest {
|
|
34
|
-
/**
|
|
35
|
-
* <p>The friendly name of the role that is assigned to the user.</p>
|
|
36
|
-
*/
|
|
37
|
-
roleName: string | undefined;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* <p>The identifier for the AWS account that is assigned to the user.</p>
|
|
41
|
-
*/
|
|
42
|
-
accountId: string | undefined;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
46
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
|
|
47
|
-
*/
|
|
48
|
-
accessToken: string | undefined;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export namespace GetRoleCredentialsRequest {
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
export const filterSensitiveLog = (obj: GetRoleCredentialsRequest): any => ({
|
|
56
|
-
...obj,
|
|
57
|
-
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* <p>Provides information about the role credentials that are assigned to the user.</p>
|
|
63
|
-
*/
|
|
64
|
-
export interface RoleCredentials {
|
|
65
|
-
/**
|
|
66
|
-
* <p>The identifier used for the temporary security credentials. For more information, see
|
|
67
|
-
* <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
|
|
68
|
-
* <i>AWS IAM User Guide</i>.</p>
|
|
69
|
-
*/
|
|
70
|
-
accessKeyId?: string;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* <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
|
|
74
|
-
* <i>AWS IAM User Guide</i>.</p>
|
|
75
|
-
*/
|
|
76
|
-
secretAccessKey?: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* <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
|
|
80
|
-
* <i>AWS IAM User Guide</i>.</p>
|
|
81
|
-
*/
|
|
82
|
-
sessionToken?: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* <p>The date on which temporary security credentials expire.</p>
|
|
86
|
-
*/
|
|
87
|
-
expiration?: number;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export namespace RoleCredentials {
|
|
91
|
-
/**
|
|
92
|
-
* @internal
|
|
93
|
-
*/
|
|
94
|
-
export const filterSensitiveLog = (obj: RoleCredentials): any => ({
|
|
95
|
-
...obj,
|
|
96
|
-
...(obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING }),
|
|
97
|
-
...(obj.sessionToken && { sessionToken: SENSITIVE_STRING }),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface GetRoleCredentialsResponse {
|
|
102
|
-
/**
|
|
103
|
-
* <p>The credentials for the role that is assigned to the user.</p>
|
|
104
|
-
*/
|
|
105
|
-
roleCredentials?: RoleCredentials;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export namespace GetRoleCredentialsResponse {
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
export const filterSensitiveLog = (obj: GetRoleCredentialsResponse): any => ({
|
|
113
|
-
...obj,
|
|
114
|
-
...(obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }),
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* <p>Indicates that a problem occurred with the input to the request. For example, a required
|
|
120
|
-
* parameter might be missing or out of range.</p>
|
|
121
|
-
*/
|
|
122
|
-
export interface InvalidRequestException extends __SmithyException, $MetadataBearer {
|
|
123
|
-
name: "InvalidRequestException";
|
|
124
|
-
$fault: "client";
|
|
125
|
-
message?: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export namespace InvalidRequestException {
|
|
129
|
-
/**
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
|
-
export const filterSensitiveLog = (obj: InvalidRequestException): any => ({
|
|
133
|
-
...obj,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* <p>The specified resource doesn't exist.</p>
|
|
139
|
-
*/
|
|
140
|
-
export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer {
|
|
141
|
-
name: "ResourceNotFoundException";
|
|
142
|
-
$fault: "client";
|
|
143
|
-
message?: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export namespace ResourceNotFoundException {
|
|
147
|
-
/**
|
|
148
|
-
* @internal
|
|
149
|
-
*/
|
|
150
|
-
export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({
|
|
151
|
-
...obj,
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* <p>Indicates that the request is being made too frequently and is more than what the server can handle.</p>
|
|
157
|
-
*/
|
|
158
|
-
export interface TooManyRequestsException extends __SmithyException, $MetadataBearer {
|
|
159
|
-
name: "TooManyRequestsException";
|
|
160
|
-
$fault: "client";
|
|
161
|
-
message?: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export namespace TooManyRequestsException {
|
|
165
|
-
/**
|
|
166
|
-
* @internal
|
|
167
|
-
*/
|
|
168
|
-
export const filterSensitiveLog = (obj: TooManyRequestsException): any => ({
|
|
169
|
-
...obj,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* <p>Indicates that the request is not authorized. This can happen due to an invalid access token in the request.</p>
|
|
175
|
-
*/
|
|
176
|
-
export interface UnauthorizedException extends __SmithyException, $MetadataBearer {
|
|
177
|
-
name: "UnauthorizedException";
|
|
178
|
-
$fault: "client";
|
|
179
|
-
message?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export namespace UnauthorizedException {
|
|
183
|
-
/**
|
|
184
|
-
* @internal
|
|
185
|
-
*/
|
|
186
|
-
export const filterSensitiveLog = (obj: UnauthorizedException): any => ({
|
|
187
|
-
...obj,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface ListAccountRolesRequest {
|
|
192
|
-
/**
|
|
193
|
-
* <p>The page token from the previous response output when you request subsequent pages.</p>
|
|
194
|
-
*/
|
|
195
|
-
nextToken?: string;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* <p>The number of items that clients can request per page.</p>
|
|
199
|
-
*/
|
|
200
|
-
maxResults?: number;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
204
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
|
|
205
|
-
*/
|
|
206
|
-
accessToken: string | undefined;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* <p>The identifier for the AWS account that is assigned to the user.</p>
|
|
210
|
-
*/
|
|
211
|
-
accountId: string | undefined;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export namespace ListAccountRolesRequest {
|
|
215
|
-
/**
|
|
216
|
-
* @internal
|
|
217
|
-
*/
|
|
218
|
-
export const filterSensitiveLog = (obj: ListAccountRolesRequest): any => ({
|
|
219
|
-
...obj,
|
|
220
|
-
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* <p>Provides information about the role that is assigned to the user.</p>
|
|
226
|
-
*/
|
|
227
|
-
export interface RoleInfo {
|
|
228
|
-
/**
|
|
229
|
-
* <p>The friendly name of the role that is assigned to the user.</p>
|
|
230
|
-
*/
|
|
231
|
-
roleName?: string;
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* <p>The identifier of the AWS account assigned to the user.</p>
|
|
235
|
-
*/
|
|
236
|
-
accountId?: string;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export namespace RoleInfo {
|
|
240
|
-
/**
|
|
241
|
-
* @internal
|
|
242
|
-
*/
|
|
243
|
-
export const filterSensitiveLog = (obj: RoleInfo): any => ({
|
|
244
|
-
...obj,
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export interface ListAccountRolesResponse {
|
|
249
|
-
/**
|
|
250
|
-
* <p>The page token client that is used to retrieve the list of accounts.</p>
|
|
251
|
-
*/
|
|
252
|
-
nextToken?: string;
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* <p>A paginated response with the list of roles and the next token if more results are available.</p>
|
|
256
|
-
*/
|
|
257
|
-
roleList?: RoleInfo[];
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export namespace ListAccountRolesResponse {
|
|
261
|
-
/**
|
|
262
|
-
* @internal
|
|
263
|
-
*/
|
|
264
|
-
export const filterSensitiveLog = (obj: ListAccountRolesResponse): any => ({
|
|
265
|
-
...obj,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export interface ListAccountsRequest {
|
|
270
|
-
/**
|
|
271
|
-
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>
|
|
272
|
-
*/
|
|
273
|
-
nextToken?: string;
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* <p>This is the number of items clients can request per page.</p>
|
|
277
|
-
*/
|
|
278
|
-
maxResults?: number;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
282
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
|
|
283
|
-
*/
|
|
284
|
-
accessToken: string | undefined;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export namespace ListAccountsRequest {
|
|
288
|
-
/**
|
|
289
|
-
* @internal
|
|
290
|
-
*/
|
|
291
|
-
export const filterSensitiveLog = (obj: ListAccountsRequest): any => ({
|
|
292
|
-
...obj,
|
|
293
|
-
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface ListAccountsResponse {
|
|
298
|
-
/**
|
|
299
|
-
* <p>The page token client that is used to retrieve the list of accounts.</p>
|
|
300
|
-
*/
|
|
301
|
-
nextToken?: string;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* <p>A paginated response with the list of account information and the next token if more results are available.</p>
|
|
305
|
-
*/
|
|
306
|
-
accountList?: AccountInfo[];
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export namespace ListAccountsResponse {
|
|
310
|
-
/**
|
|
311
|
-
* @internal
|
|
312
|
-
*/
|
|
313
|
-
export const filterSensitiveLog = (obj: ListAccountsResponse): any => ({
|
|
314
|
-
...obj,
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export interface LogoutRequest {
|
|
319
|
-
/**
|
|
320
|
-
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
|
|
321
|
-
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
|
|
322
|
-
*/
|
|
323
|
-
accessToken: string | undefined;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export namespace LogoutRequest {
|
|
327
|
-
/**
|
|
328
|
-
* @internal
|
|
329
|
-
*/
|
|
330
|
-
export const filterSensitiveLog = (obj: LogoutRequest): any => ({
|
|
331
|
-
...obj,
|
|
332
|
-
...(obj.accessToken && { accessToken: SENSITIVE_STRING }),
|
|
333
|
-
});
|
|
334
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListAccountRolesCommand,
|
|
5
|
-
ListAccountRolesCommandInput,
|
|
6
|
-
ListAccountRolesCommandOutput,
|
|
7
|
-
} from "../commands/ListAccountRolesCommand";
|
|
8
|
-
import { SSO } from "../SSO";
|
|
9
|
-
import { SSOClient } from "../SSOClient";
|
|
10
|
-
import { SSOPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: SSOClient,
|
|
17
|
-
input: ListAccountRolesCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListAccountRolesCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListAccountRolesCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: SSO,
|
|
28
|
-
input: ListAccountRolesCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListAccountRolesCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listAccountRoles(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListAccountRoles(
|
|
35
|
-
config: SSOPaginationConfiguration,
|
|
36
|
-
input: ListAccountRolesCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListAccountRolesCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.nextToken
|
|
40
|
-
let token: typeof input.nextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListAccountRolesCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.nextToken = token;
|
|
45
|
-
input["maxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof SSO) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof SSOClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected SSO | SSOClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.nextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListAccountsCommand,
|
|
5
|
-
ListAccountsCommandInput,
|
|
6
|
-
ListAccountsCommandOutput,
|
|
7
|
-
} from "../commands/ListAccountsCommand";
|
|
8
|
-
import { SSO } from "../SSO";
|
|
9
|
-
import { SSOClient } from "../SSOClient";
|
|
10
|
-
import { SSOPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: SSOClient,
|
|
17
|
-
input: ListAccountsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListAccountsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListAccountsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: SSO,
|
|
28
|
-
input: ListAccountsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListAccountsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listAccounts(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListAccounts(
|
|
35
|
-
config: SSOPaginationConfiguration,
|
|
36
|
-
input: ListAccountsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListAccountsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.nextToken
|
|
40
|
-
let token: typeof input.nextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListAccountsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.nextToken = token;
|
|
45
|
-
input["maxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof SSO) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof SSOClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected SSO | SSOClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.nextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|