@aws-sdk/client-service-quotas 3.927.0 → 3.928.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.
Files changed (45) hide show
  1. package/dist-cjs/index.js +922 -1080
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/ServiceQuotasClient.js +2 -0
  4. package/dist-es/commands/AssociateServiceQuotaTemplateCommand.js +3 -9
  5. package/dist-es/commands/CreateSupportCaseCommand.js +3 -9
  6. package/dist-es/commands/DeleteServiceQuotaIncreaseRequestFromTemplateCommand.js +3 -9
  7. package/dist-es/commands/DisassociateServiceQuotaTemplateCommand.js +3 -9
  8. package/dist-es/commands/GetAWSDefaultServiceQuotaCommand.js +3 -9
  9. package/dist-es/commands/GetAssociationForServiceQuotaTemplateCommand.js +3 -9
  10. package/dist-es/commands/GetAutoManagementConfigurationCommand.js +3 -9
  11. package/dist-es/commands/GetRequestedServiceQuotaChangeCommand.js +3 -9
  12. package/dist-es/commands/GetServiceQuotaCommand.js +3 -9
  13. package/dist-es/commands/GetServiceQuotaIncreaseRequestFromTemplateCommand.js +3 -9
  14. package/dist-es/commands/ListAWSDefaultServiceQuotasCommand.js +3 -9
  15. package/dist-es/commands/ListRequestedServiceQuotaChangeHistoryByQuotaCommand.js +3 -9
  16. package/dist-es/commands/ListRequestedServiceQuotaChangeHistoryCommand.js +3 -9
  17. package/dist-es/commands/ListServiceQuotaIncreaseRequestsInTemplateCommand.js +3 -9
  18. package/dist-es/commands/ListServiceQuotasCommand.js +3 -9
  19. package/dist-es/commands/ListServicesCommand.js +3 -9
  20. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  21. package/dist-es/commands/PutServiceQuotaIncreaseRequestIntoTemplateCommand.js +3 -9
  22. package/dist-es/commands/RequestServiceQuotaIncreaseCommand.js +3 -9
  23. package/dist-es/commands/StartAutoManagementCommand.js +3 -9
  24. package/dist-es/commands/StopAutoManagementCommand.js +3 -9
  25. package/dist-es/commands/TagResourceCommand.js +3 -9
  26. package/dist-es/commands/UntagResourceCommand.js +3 -9
  27. package/dist-es/commands/UpdateAutoManagementCommand.js +3 -9
  28. package/dist-es/runtimeConfig.shared.js +7 -0
  29. package/dist-es/schemas/schemas_0.js +826 -0
  30. package/dist-types/ServiceQuotasClient.d.ts +10 -1
  31. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  32. package/dist-types/runtimeConfig.d.ts +1 -0
  33. package/dist-types/runtimeConfig.native.d.ts +1 -0
  34. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  35. package/dist-types/schemas/schemas_0.d.ts +114 -0
  36. package/dist-types/ts3.4/ServiceQuotasClient.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  40. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  41. package/dist-types/ts3.4/schemas/schemas_0.d.ts +120 -0
  42. package/package.json +5 -5
  43. package/dist-es/protocols/Aws_json1_1.js +0 -865
  44. package/dist-types/protocols/Aws_json1_1.d.ts +0 -218
  45. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -293
@@ -1,865 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, AWSServiceAccessNotEnabledException, DependencyAccessDeniedException, IllegalArgumentException, InvalidPaginationTokenException, InvalidResourceStateException, NoAvailableOrganizationException, NoSuchResourceException, OrganizationNotInAllFeaturesModeException, QuotaExceededException, ResourceAlreadyExistsException, ServiceException, ServiceQuotaTemplateNotInUseException, TagPolicyViolationException, TemplatesNotAvailableInRegionException, TooManyRequestsException, TooManyTagsException, } from "../models/models_0";
5
- import { ServiceQuotasServiceException as __BaseException } from "../models/ServiceQuotasServiceException";
6
- export const se_AssociateServiceQuotaTemplateCommand = async (input, context) => {
7
- const headers = sharedHeaders("AssociateServiceQuotaTemplate");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CreateSupportCaseCommand = async (input, context) => {
13
- const headers = sharedHeaders("CreateSupportCase");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
19
- const headers = sharedHeaders("DeleteServiceQuotaIncreaseRequestFromTemplate");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DisassociateServiceQuotaTemplateCommand = async (input, context) => {
25
- const headers = sharedHeaders("DisassociateServiceQuotaTemplate");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_GetAssociationForServiceQuotaTemplateCommand = async (input, context) => {
31
- const headers = sharedHeaders("GetAssociationForServiceQuotaTemplate");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_GetAutoManagementConfigurationCommand = async (input, context) => {
37
- const headers = sharedHeaders("GetAutoManagementConfiguration");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_GetAWSDefaultServiceQuotaCommand = async (input, context) => {
43
- const headers = sharedHeaders("GetAWSDefaultServiceQuota");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_GetRequestedServiceQuotaChangeCommand = async (input, context) => {
49
- const headers = sharedHeaders("GetRequestedServiceQuotaChange");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_GetServiceQuotaCommand = async (input, context) => {
55
- const headers = sharedHeaders("GetServiceQuota");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (input, context) => {
61
- const headers = sharedHeaders("GetServiceQuotaIncreaseRequestFromTemplate");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_ListAWSDefaultServiceQuotasCommand = async (input, context) => {
67
- const headers = sharedHeaders("ListAWSDefaultServiceQuotas");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_ListRequestedServiceQuotaChangeHistoryCommand = async (input, context) => {
73
- const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistory");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (input, context) => {
79
- const headers = sharedHeaders("ListRequestedServiceQuotaChangeHistoryByQuota");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (input, context) => {
85
- const headers = sharedHeaders("ListServiceQuotaIncreaseRequestsInTemplate");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_ListServiceQuotasCommand = async (input, context) => {
91
- const headers = sharedHeaders("ListServiceQuotas");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_ListServicesCommand = async (input, context) => {
97
- const headers = sharedHeaders("ListServices");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_ListTagsForResourceCommand = async (input, context) => {
103
- const headers = sharedHeaders("ListTagsForResource");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (input, context) => {
109
- const headers = sharedHeaders("PutServiceQuotaIncreaseRequestIntoTemplate");
110
- let body;
111
- body = JSON.stringify(se_PutServiceQuotaIncreaseRequestIntoTemplateRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_RequestServiceQuotaIncreaseCommand = async (input, context) => {
115
- const headers = sharedHeaders("RequestServiceQuotaIncrease");
116
- let body;
117
- body = JSON.stringify(se_RequestServiceQuotaIncreaseRequest(input, context));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_StartAutoManagementCommand = async (input, context) => {
121
- const headers = sharedHeaders("StartAutoManagement");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_StopAutoManagementCommand = async (input, context) => {
127
- const headers = sharedHeaders("StopAutoManagement");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_TagResourceCommand = async (input, context) => {
133
- const headers = sharedHeaders("TagResource");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_UntagResourceCommand = async (input, context) => {
139
- const headers = sharedHeaders("UntagResource");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_UpdateAutoManagementCommand = async (input, context) => {
145
- const headers = sharedHeaders("UpdateAutoManagement");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const de_AssociateServiceQuotaTemplateCommand = async (output, context) => {
151
- if (output.statusCode >= 300) {
152
- return de_CommandError(output, context);
153
- }
154
- const data = await parseBody(output.body, context);
155
- let contents = {};
156
- contents = _json(data);
157
- const response = {
158
- $metadata: deserializeMetadata(output),
159
- ...contents,
160
- };
161
- return response;
162
- };
163
- export const de_CreateSupportCaseCommand = async (output, context) => {
164
- if (output.statusCode >= 300) {
165
- return de_CommandError(output, context);
166
- }
167
- const data = await parseBody(output.body, context);
168
- let contents = {};
169
- contents = _json(data);
170
- const response = {
171
- $metadata: deserializeMetadata(output),
172
- ...contents,
173
- };
174
- return response;
175
- };
176
- export const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
177
- if (output.statusCode >= 300) {
178
- return de_CommandError(output, context);
179
- }
180
- const data = await parseBody(output.body, context);
181
- let contents = {};
182
- contents = _json(data);
183
- const response = {
184
- $metadata: deserializeMetadata(output),
185
- ...contents,
186
- };
187
- return response;
188
- };
189
- export const de_DisassociateServiceQuotaTemplateCommand = async (output, context) => {
190
- if (output.statusCode >= 300) {
191
- return de_CommandError(output, context);
192
- }
193
- const data = await parseBody(output.body, context);
194
- let contents = {};
195
- contents = _json(data);
196
- const response = {
197
- $metadata: deserializeMetadata(output),
198
- ...contents,
199
- };
200
- return response;
201
- };
202
- export const de_GetAssociationForServiceQuotaTemplateCommand = async (output, context) => {
203
- if (output.statusCode >= 300) {
204
- return de_CommandError(output, context);
205
- }
206
- const data = await parseBody(output.body, context);
207
- let contents = {};
208
- contents = _json(data);
209
- const response = {
210
- $metadata: deserializeMetadata(output),
211
- ...contents,
212
- };
213
- return response;
214
- };
215
- export const de_GetAutoManagementConfigurationCommand = async (output, context) => {
216
- if (output.statusCode >= 300) {
217
- return de_CommandError(output, context);
218
- }
219
- const data = await parseBody(output.body, context);
220
- let contents = {};
221
- contents = _json(data);
222
- const response = {
223
- $metadata: deserializeMetadata(output),
224
- ...contents,
225
- };
226
- return response;
227
- };
228
- export const de_GetAWSDefaultServiceQuotaCommand = async (output, context) => {
229
- if (output.statusCode >= 300) {
230
- return de_CommandError(output, context);
231
- }
232
- const data = await parseBody(output.body, context);
233
- let contents = {};
234
- contents = de_GetAWSDefaultServiceQuotaResponse(data, context);
235
- const response = {
236
- $metadata: deserializeMetadata(output),
237
- ...contents,
238
- };
239
- return response;
240
- };
241
- export const de_GetRequestedServiceQuotaChangeCommand = async (output, context) => {
242
- if (output.statusCode >= 300) {
243
- return de_CommandError(output, context);
244
- }
245
- const data = await parseBody(output.body, context);
246
- let contents = {};
247
- contents = de_GetRequestedServiceQuotaChangeResponse(data, context);
248
- const response = {
249
- $metadata: deserializeMetadata(output),
250
- ...contents,
251
- };
252
- return response;
253
- };
254
- export const de_GetServiceQuotaCommand = async (output, context) => {
255
- if (output.statusCode >= 300) {
256
- return de_CommandError(output, context);
257
- }
258
- const data = await parseBody(output.body, context);
259
- let contents = {};
260
- contents = de_GetServiceQuotaResponse(data, context);
261
- const response = {
262
- $metadata: deserializeMetadata(output),
263
- ...contents,
264
- };
265
- return response;
266
- };
267
- export const de_GetServiceQuotaIncreaseRequestFromTemplateCommand = async (output, context) => {
268
- if (output.statusCode >= 300) {
269
- return de_CommandError(output, context);
270
- }
271
- const data = await parseBody(output.body, context);
272
- let contents = {};
273
- contents = de_GetServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
274
- const response = {
275
- $metadata: deserializeMetadata(output),
276
- ...contents,
277
- };
278
- return response;
279
- };
280
- export const de_ListAWSDefaultServiceQuotasCommand = async (output, context) => {
281
- if (output.statusCode >= 300) {
282
- return de_CommandError(output, context);
283
- }
284
- const data = await parseBody(output.body, context);
285
- let contents = {};
286
- contents = de_ListAWSDefaultServiceQuotasResponse(data, context);
287
- const response = {
288
- $metadata: deserializeMetadata(output),
289
- ...contents,
290
- };
291
- return response;
292
- };
293
- export const de_ListRequestedServiceQuotaChangeHistoryCommand = async (output, context) => {
294
- if (output.statusCode >= 300) {
295
- return de_CommandError(output, context);
296
- }
297
- const data = await parseBody(output.body, context);
298
- let contents = {};
299
- contents = de_ListRequestedServiceQuotaChangeHistoryResponse(data, context);
300
- const response = {
301
- $metadata: deserializeMetadata(output),
302
- ...contents,
303
- };
304
- return response;
305
- };
306
- export const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async (output, context) => {
307
- if (output.statusCode >= 300) {
308
- return de_CommandError(output, context);
309
- }
310
- const data = await parseBody(output.body, context);
311
- let contents = {};
312
- contents = de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse(data, context);
313
- const response = {
314
- $metadata: deserializeMetadata(output),
315
- ...contents,
316
- };
317
- return response;
318
- };
319
- export const de_ListServiceQuotaIncreaseRequestsInTemplateCommand = async (output, context) => {
320
- if (output.statusCode >= 300) {
321
- return de_CommandError(output, context);
322
- }
323
- const data = await parseBody(output.body, context);
324
- let contents = {};
325
- contents = de_ListServiceQuotaIncreaseRequestsInTemplateResponse(data, context);
326
- const response = {
327
- $metadata: deserializeMetadata(output),
328
- ...contents,
329
- };
330
- return response;
331
- };
332
- export const de_ListServiceQuotasCommand = async (output, context) => {
333
- if (output.statusCode >= 300) {
334
- return de_CommandError(output, context);
335
- }
336
- const data = await parseBody(output.body, context);
337
- let contents = {};
338
- contents = de_ListServiceQuotasResponse(data, context);
339
- const response = {
340
- $metadata: deserializeMetadata(output),
341
- ...contents,
342
- };
343
- return response;
344
- };
345
- export const de_ListServicesCommand = async (output, context) => {
346
- if (output.statusCode >= 300) {
347
- return de_CommandError(output, context);
348
- }
349
- const data = await parseBody(output.body, context);
350
- let contents = {};
351
- contents = _json(data);
352
- const response = {
353
- $metadata: deserializeMetadata(output),
354
- ...contents,
355
- };
356
- return response;
357
- };
358
- export const de_ListTagsForResourceCommand = async (output, context) => {
359
- if (output.statusCode >= 300) {
360
- return de_CommandError(output, context);
361
- }
362
- const data = await parseBody(output.body, context);
363
- let contents = {};
364
- contents = _json(data);
365
- const response = {
366
- $metadata: deserializeMetadata(output),
367
- ...contents,
368
- };
369
- return response;
370
- };
371
- export const de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async (output, context) => {
372
- if (output.statusCode >= 300) {
373
- return de_CommandError(output, context);
374
- }
375
- const data = await parseBody(output.body, context);
376
- let contents = {};
377
- contents = de_PutServiceQuotaIncreaseRequestIntoTemplateResponse(data, context);
378
- const response = {
379
- $metadata: deserializeMetadata(output),
380
- ...contents,
381
- };
382
- return response;
383
- };
384
- export const de_RequestServiceQuotaIncreaseCommand = async (output, context) => {
385
- if (output.statusCode >= 300) {
386
- return de_CommandError(output, context);
387
- }
388
- const data = await parseBody(output.body, context);
389
- let contents = {};
390
- contents = de_RequestServiceQuotaIncreaseResponse(data, context);
391
- const response = {
392
- $metadata: deserializeMetadata(output),
393
- ...contents,
394
- };
395
- return response;
396
- };
397
- export const de_StartAutoManagementCommand = async (output, context) => {
398
- if (output.statusCode >= 300) {
399
- return de_CommandError(output, context);
400
- }
401
- const data = await parseBody(output.body, context);
402
- let contents = {};
403
- contents = _json(data);
404
- const response = {
405
- $metadata: deserializeMetadata(output),
406
- ...contents,
407
- };
408
- return response;
409
- };
410
- export const de_StopAutoManagementCommand = async (output, context) => {
411
- if (output.statusCode >= 300) {
412
- return de_CommandError(output, context);
413
- }
414
- const data = await parseBody(output.body, context);
415
- let contents = {};
416
- contents = _json(data);
417
- const response = {
418
- $metadata: deserializeMetadata(output),
419
- ...contents,
420
- };
421
- return response;
422
- };
423
- export const de_TagResourceCommand = async (output, context) => {
424
- if (output.statusCode >= 300) {
425
- return de_CommandError(output, context);
426
- }
427
- const data = await parseBody(output.body, context);
428
- let contents = {};
429
- contents = _json(data);
430
- const response = {
431
- $metadata: deserializeMetadata(output),
432
- ...contents,
433
- };
434
- return response;
435
- };
436
- export const de_UntagResourceCommand = async (output, context) => {
437
- if (output.statusCode >= 300) {
438
- return de_CommandError(output, context);
439
- }
440
- const data = await parseBody(output.body, context);
441
- let contents = {};
442
- contents = _json(data);
443
- const response = {
444
- $metadata: deserializeMetadata(output),
445
- ...contents,
446
- };
447
- return response;
448
- };
449
- export const de_UpdateAutoManagementCommand = async (output, context) => {
450
- if (output.statusCode >= 300) {
451
- return de_CommandError(output, context);
452
- }
453
- const data = await parseBody(output.body, context);
454
- let contents = {};
455
- contents = _json(data);
456
- const response = {
457
- $metadata: deserializeMetadata(output),
458
- ...contents,
459
- };
460
- return response;
461
- };
462
- const de_CommandError = async (output, context) => {
463
- const parsedOutput = {
464
- ...output,
465
- body: await parseErrorBody(output.body, context),
466
- };
467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
468
- switch (errorCode) {
469
- case "AWSServiceAccessNotEnabledException":
470
- case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
471
- throw await de_AWSServiceAccessNotEnabledExceptionRes(parsedOutput, context);
472
- case "AccessDeniedException":
473
- case "com.amazonaws.servicequotas#AccessDeniedException":
474
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
475
- case "DependencyAccessDeniedException":
476
- case "com.amazonaws.servicequotas#DependencyAccessDeniedException":
477
- throw await de_DependencyAccessDeniedExceptionRes(parsedOutput, context);
478
- case "NoAvailableOrganizationException":
479
- case "com.amazonaws.servicequotas#NoAvailableOrganizationException":
480
- throw await de_NoAvailableOrganizationExceptionRes(parsedOutput, context);
481
- case "OrganizationNotInAllFeaturesModeException":
482
- case "com.amazonaws.servicequotas#OrganizationNotInAllFeaturesModeException":
483
- throw await de_OrganizationNotInAllFeaturesModeExceptionRes(parsedOutput, context);
484
- case "ServiceException":
485
- case "com.amazonaws.servicequotas#ServiceException":
486
- throw await de_ServiceExceptionRes(parsedOutput, context);
487
- case "TemplatesNotAvailableInRegionException":
488
- case "com.amazonaws.servicequotas#TemplatesNotAvailableInRegionException":
489
- throw await de_TemplatesNotAvailableInRegionExceptionRes(parsedOutput, context);
490
- case "TooManyRequestsException":
491
- case "com.amazonaws.servicequotas#TooManyRequestsException":
492
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
493
- case "IllegalArgumentException":
494
- case "com.amazonaws.servicequotas#IllegalArgumentException":
495
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
496
- case "InvalidResourceStateException":
497
- case "com.amazonaws.servicequotas#InvalidResourceStateException":
498
- throw await de_InvalidResourceStateExceptionRes(parsedOutput, context);
499
- case "NoSuchResourceException":
500
- case "com.amazonaws.servicequotas#NoSuchResourceException":
501
- throw await de_NoSuchResourceExceptionRes(parsedOutput, context);
502
- case "ResourceAlreadyExistsException":
503
- case "com.amazonaws.servicequotas#ResourceAlreadyExistsException":
504
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
505
- case "ServiceQuotaTemplateNotInUseException":
506
- case "com.amazonaws.servicequotas#ServiceQuotaTemplateNotInUseException":
507
- throw await de_ServiceQuotaTemplateNotInUseExceptionRes(parsedOutput, context);
508
- case "InvalidPaginationTokenException":
509
- case "com.amazonaws.servicequotas#InvalidPaginationTokenException":
510
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
511
- case "QuotaExceededException":
512
- case "com.amazonaws.servicequotas#QuotaExceededException":
513
- throw await de_QuotaExceededExceptionRes(parsedOutput, context);
514
- case "TagPolicyViolationException":
515
- case "com.amazonaws.servicequotas#TagPolicyViolationException":
516
- throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
517
- case "TooManyTagsException":
518
- case "com.amazonaws.servicequotas#TooManyTagsException":
519
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
520
- default:
521
- const parsedBody = parsedOutput.body;
522
- return throwDefaultError({
523
- output,
524
- parsedBody,
525
- errorCode,
526
- });
527
- }
528
- };
529
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
530
- const body = parsedOutput.body;
531
- const deserialized = _json(body);
532
- const exception = new AccessDeniedException({
533
- $metadata: deserializeMetadata(parsedOutput),
534
- ...deserialized,
535
- });
536
- return __decorateServiceException(exception, body);
537
- };
538
- const de_AWSServiceAccessNotEnabledExceptionRes = async (parsedOutput, context) => {
539
- const body = parsedOutput.body;
540
- const deserialized = _json(body);
541
- const exception = new AWSServiceAccessNotEnabledException({
542
- $metadata: deserializeMetadata(parsedOutput),
543
- ...deserialized,
544
- });
545
- return __decorateServiceException(exception, body);
546
- };
547
- const de_DependencyAccessDeniedExceptionRes = async (parsedOutput, context) => {
548
- const body = parsedOutput.body;
549
- const deserialized = _json(body);
550
- const exception = new DependencyAccessDeniedException({
551
- $metadata: deserializeMetadata(parsedOutput),
552
- ...deserialized,
553
- });
554
- return __decorateServiceException(exception, body);
555
- };
556
- const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
557
- const body = parsedOutput.body;
558
- const deserialized = _json(body);
559
- const exception = new IllegalArgumentException({
560
- $metadata: deserializeMetadata(parsedOutput),
561
- ...deserialized,
562
- });
563
- return __decorateServiceException(exception, body);
564
- };
565
- const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
566
- const body = parsedOutput.body;
567
- const deserialized = _json(body);
568
- const exception = new InvalidPaginationTokenException({
569
- $metadata: deserializeMetadata(parsedOutput),
570
- ...deserialized,
571
- });
572
- return __decorateServiceException(exception, body);
573
- };
574
- const de_InvalidResourceStateExceptionRes = async (parsedOutput, context) => {
575
- const body = parsedOutput.body;
576
- const deserialized = _json(body);
577
- const exception = new InvalidResourceStateException({
578
- $metadata: deserializeMetadata(parsedOutput),
579
- ...deserialized,
580
- });
581
- return __decorateServiceException(exception, body);
582
- };
583
- const de_NoAvailableOrganizationExceptionRes = async (parsedOutput, context) => {
584
- const body = parsedOutput.body;
585
- const deserialized = _json(body);
586
- const exception = new NoAvailableOrganizationException({
587
- $metadata: deserializeMetadata(parsedOutput),
588
- ...deserialized,
589
- });
590
- return __decorateServiceException(exception, body);
591
- };
592
- const de_NoSuchResourceExceptionRes = async (parsedOutput, context) => {
593
- const body = parsedOutput.body;
594
- const deserialized = _json(body);
595
- const exception = new NoSuchResourceException({
596
- $metadata: deserializeMetadata(parsedOutput),
597
- ...deserialized,
598
- });
599
- return __decorateServiceException(exception, body);
600
- };
601
- const de_OrganizationNotInAllFeaturesModeExceptionRes = async (parsedOutput, context) => {
602
- const body = parsedOutput.body;
603
- const deserialized = _json(body);
604
- const exception = new OrganizationNotInAllFeaturesModeException({
605
- $metadata: deserializeMetadata(parsedOutput),
606
- ...deserialized,
607
- });
608
- return __decorateServiceException(exception, body);
609
- };
610
- const de_QuotaExceededExceptionRes = async (parsedOutput, context) => {
611
- const body = parsedOutput.body;
612
- const deserialized = _json(body);
613
- const exception = new QuotaExceededException({
614
- $metadata: deserializeMetadata(parsedOutput),
615
- ...deserialized,
616
- });
617
- return __decorateServiceException(exception, body);
618
- };
619
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
620
- const body = parsedOutput.body;
621
- const deserialized = _json(body);
622
- const exception = new ResourceAlreadyExistsException({
623
- $metadata: deserializeMetadata(parsedOutput),
624
- ...deserialized,
625
- });
626
- return __decorateServiceException(exception, body);
627
- };
628
- const de_ServiceExceptionRes = async (parsedOutput, context) => {
629
- const body = parsedOutput.body;
630
- const deserialized = _json(body);
631
- const exception = new ServiceException({
632
- $metadata: deserializeMetadata(parsedOutput),
633
- ...deserialized,
634
- });
635
- return __decorateServiceException(exception, body);
636
- };
637
- const de_ServiceQuotaTemplateNotInUseExceptionRes = async (parsedOutput, context) => {
638
- const body = parsedOutput.body;
639
- const deserialized = _json(body);
640
- const exception = new ServiceQuotaTemplateNotInUseException({
641
- $metadata: deserializeMetadata(parsedOutput),
642
- ...deserialized,
643
- });
644
- return __decorateServiceException(exception, body);
645
- };
646
- const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
647
- const body = parsedOutput.body;
648
- const deserialized = _json(body);
649
- const exception = new TagPolicyViolationException({
650
- $metadata: deserializeMetadata(parsedOutput),
651
- ...deserialized,
652
- });
653
- return __decorateServiceException(exception, body);
654
- };
655
- const de_TemplatesNotAvailableInRegionExceptionRes = async (parsedOutput, context) => {
656
- const body = parsedOutput.body;
657
- const deserialized = _json(body);
658
- const exception = new TemplatesNotAvailableInRegionException({
659
- $metadata: deserializeMetadata(parsedOutput),
660
- ...deserialized,
661
- });
662
- return __decorateServiceException(exception, body);
663
- };
664
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
665
- const body = parsedOutput.body;
666
- const deserialized = _json(body);
667
- const exception = new TooManyRequestsException({
668
- $metadata: deserializeMetadata(parsedOutput),
669
- ...deserialized,
670
- });
671
- return __decorateServiceException(exception, body);
672
- };
673
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
674
- const body = parsedOutput.body;
675
- const deserialized = _json(body);
676
- const exception = new TooManyTagsException({
677
- $metadata: deserializeMetadata(parsedOutput),
678
- ...deserialized,
679
- });
680
- return __decorateServiceException(exception, body);
681
- };
682
- const se_PutServiceQuotaIncreaseRequestIntoTemplateRequest = (input, context) => {
683
- return take(input, {
684
- AwsRegion: [],
685
- DesiredValue: __serializeFloat,
686
- QuotaCode: [],
687
- ServiceCode: [],
688
- });
689
- };
690
- const se_RequestServiceQuotaIncreaseRequest = (input, context) => {
691
- return take(input, {
692
- ContextId: [],
693
- DesiredValue: __serializeFloat,
694
- QuotaCode: [],
695
- ServiceCode: [],
696
- SupportCaseAllowed: [],
697
- });
698
- };
699
- const de_GetAWSDefaultServiceQuotaResponse = (output, context) => {
700
- return take(output, {
701
- Quota: (_) => de_ServiceQuota(_, context),
702
- });
703
- };
704
- const de_GetRequestedServiceQuotaChangeResponse = (output, context) => {
705
- return take(output, {
706
- RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
707
- });
708
- };
709
- const de_GetServiceQuotaIncreaseRequestFromTemplateResponse = (output, context) => {
710
- return take(output, {
711
- ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
712
- });
713
- };
714
- const de_GetServiceQuotaResponse = (output, context) => {
715
- return take(output, {
716
- Quota: (_) => de_ServiceQuota(_, context),
717
- });
718
- };
719
- const de_ListAWSDefaultServiceQuotasResponse = (output, context) => {
720
- return take(output, {
721
- NextToken: __expectString,
722
- Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
723
- });
724
- };
725
- const de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse = (output, context) => {
726
- return take(output, {
727
- NextToken: __expectString,
728
- RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
729
- });
730
- };
731
- const de_ListRequestedServiceQuotaChangeHistoryResponse = (output, context) => {
732
- return take(output, {
733
- NextToken: __expectString,
734
- RequestedQuotas: (_) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context),
735
- });
736
- };
737
- const de_ListServiceQuotaIncreaseRequestsInTemplateResponse = (output, context) => {
738
- return take(output, {
739
- NextToken: __expectString,
740
- ServiceQuotaIncreaseRequestInTemplateList: (_) => de_ServiceQuotaIncreaseRequestInTemplateList(_, context),
741
- });
742
- };
743
- const de_ListServiceQuotasResponse = (output, context) => {
744
- return take(output, {
745
- NextToken: __expectString,
746
- Quotas: (_) => de_ServiceQuotaListDefinition(_, context),
747
- });
748
- };
749
- const de_PutServiceQuotaIncreaseRequestIntoTemplateResponse = (output, context) => {
750
- return take(output, {
751
- ServiceQuotaIncreaseRequestInTemplate: (_) => de_ServiceQuotaIncreaseRequestInTemplate(_, context),
752
- });
753
- };
754
- const de_RequestedServiceQuotaChange = (output, context) => {
755
- return take(output, {
756
- CaseId: __expectString,
757
- Created: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
758
- DesiredValue: __limitedParseDouble,
759
- GlobalQuota: __expectBoolean,
760
- Id: __expectString,
761
- LastUpdated: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
762
- QuotaArn: __expectString,
763
- QuotaCode: __expectString,
764
- QuotaContext: _json,
765
- QuotaName: __expectString,
766
- QuotaRequestedAtLevel: __expectString,
767
- Requester: __expectString,
768
- ServiceCode: __expectString,
769
- ServiceName: __expectString,
770
- Status: __expectString,
771
- Unit: __expectString,
772
- });
773
- };
774
- const de_RequestedServiceQuotaChangeHistoryListDefinition = (output, context) => {
775
- const retVal = (output || [])
776
- .filter((e) => e != null)
777
- .map((entry) => {
778
- return de_RequestedServiceQuotaChange(entry, context);
779
- });
780
- return retVal;
781
- };
782
- const de_RequestServiceQuotaIncreaseResponse = (output, context) => {
783
- return take(output, {
784
- RequestedQuota: (_) => de_RequestedServiceQuotaChange(_, context),
785
- });
786
- };
787
- const de_ServiceQuota = (output, context) => {
788
- return take(output, {
789
- Adjustable: __expectBoolean,
790
- Description: __expectString,
791
- ErrorReason: _json,
792
- GlobalQuota: __expectBoolean,
793
- Period: _json,
794
- QuotaAppliedAtLevel: __expectString,
795
- QuotaArn: __expectString,
796
- QuotaCode: __expectString,
797
- QuotaContext: _json,
798
- QuotaName: __expectString,
799
- ServiceCode: __expectString,
800
- ServiceName: __expectString,
801
- Unit: __expectString,
802
- UsageMetric: _json,
803
- Value: __limitedParseDouble,
804
- });
805
- };
806
- const de_ServiceQuotaIncreaseRequestInTemplate = (output, context) => {
807
- return take(output, {
808
- AwsRegion: __expectString,
809
- DesiredValue: __limitedParseDouble,
810
- GlobalQuota: __expectBoolean,
811
- QuotaCode: __expectString,
812
- QuotaName: __expectString,
813
- ServiceCode: __expectString,
814
- ServiceName: __expectString,
815
- Unit: __expectString,
816
- });
817
- };
818
- const de_ServiceQuotaIncreaseRequestInTemplateList = (output, context) => {
819
- const retVal = (output || [])
820
- .filter((e) => e != null)
821
- .map((entry) => {
822
- return de_ServiceQuotaIncreaseRequestInTemplate(entry, context);
823
- });
824
- return retVal;
825
- };
826
- const de_ServiceQuotaListDefinition = (output, context) => {
827
- const retVal = (output || [])
828
- .filter((e) => e != null)
829
- .map((entry) => {
830
- return de_ServiceQuota(entry, context);
831
- });
832
- return retVal;
833
- };
834
- const deserializeMetadata = (output) => ({
835
- httpStatusCode: output.statusCode,
836
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
837
- extendedRequestId: output.headers["x-amz-id-2"],
838
- cfId: output.headers["x-amz-cf-id"],
839
- });
840
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
841
- const throwDefaultError = withBaseException(__BaseException);
842
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
843
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
844
- const contents = {
845
- protocol,
846
- hostname,
847
- port,
848
- method: "POST",
849
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
850
- headers,
851
- };
852
- if (resolvedHostname !== undefined) {
853
- contents.hostname = resolvedHostname;
854
- }
855
- if (body !== undefined) {
856
- contents.body = body;
857
- }
858
- return new __HttpRequest(contents);
859
- };
860
- function sharedHeaders(operation) {
861
- return {
862
- "content-type": "application/x-amz-json-1.1",
863
- "x-amz-target": `ServiceQuotasV20190624.${operation}`,
864
- };
865
- }