@aws-sdk/client-appconfig 3.490.0 → 3.495.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 (65) hide show
  1. package/dist-cjs/AppConfig.js +1 -97
  2. package/dist-cjs/AppConfigClient.js +1 -43
  3. package/dist-cjs/commands/CreateApplicationCommand.js +1 -28
  4. package/dist-cjs/commands/CreateConfigurationProfileCommand.js +1 -29
  5. package/dist-cjs/commands/CreateDeploymentStrategyCommand.js +1 -28
  6. package/dist-cjs/commands/CreateEnvironmentCommand.js +1 -28
  7. package/dist-cjs/commands/CreateExtensionAssociationCommand.js +1 -28
  8. package/dist-cjs/commands/CreateExtensionCommand.js +1 -28
  9. package/dist-cjs/commands/CreateHostedConfigurationVersionCommand.js +1 -29
  10. package/dist-cjs/commands/DeleteApplicationCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteConfigurationProfileCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteDeploymentStrategyCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteEnvironmentCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteExtensionAssociationCommand.js +1 -28
  15. package/dist-cjs/commands/DeleteExtensionCommand.js +1 -28
  16. package/dist-cjs/commands/DeleteHostedConfigurationVersionCommand.js +1 -28
  17. package/dist-cjs/commands/GetApplicationCommand.js +1 -28
  18. package/dist-cjs/commands/GetConfigurationCommand.js +1 -29
  19. package/dist-cjs/commands/GetConfigurationProfileCommand.js +1 -29
  20. package/dist-cjs/commands/GetDeploymentCommand.js +1 -28
  21. package/dist-cjs/commands/GetDeploymentStrategyCommand.js +1 -28
  22. package/dist-cjs/commands/GetEnvironmentCommand.js +1 -28
  23. package/dist-cjs/commands/GetExtensionAssociationCommand.js +1 -28
  24. package/dist-cjs/commands/GetExtensionCommand.js +1 -28
  25. package/dist-cjs/commands/GetHostedConfigurationVersionCommand.js +1 -29
  26. package/dist-cjs/commands/ListApplicationsCommand.js +1 -28
  27. package/dist-cjs/commands/ListConfigurationProfilesCommand.js +1 -28
  28. package/dist-cjs/commands/ListDeploymentStrategiesCommand.js +1 -28
  29. package/dist-cjs/commands/ListDeploymentsCommand.js +1 -28
  30. package/dist-cjs/commands/ListEnvironmentsCommand.js +1 -28
  31. package/dist-cjs/commands/ListExtensionAssociationsCommand.js +1 -28
  32. package/dist-cjs/commands/ListExtensionsCommand.js +1 -28
  33. package/dist-cjs/commands/ListHostedConfigurationVersionsCommand.js +1 -28
  34. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  35. package/dist-cjs/commands/StartDeploymentCommand.js +1 -28
  36. package/dist-cjs/commands/StopDeploymentCommand.js +1 -28
  37. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  38. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  39. package/dist-cjs/commands/UpdateApplicationCommand.js +1 -28
  40. package/dist-cjs/commands/UpdateConfigurationProfileCommand.js +1 -29
  41. package/dist-cjs/commands/UpdateDeploymentStrategyCommand.js +1 -28
  42. package/dist-cjs/commands/UpdateEnvironmentCommand.js +1 -28
  43. package/dist-cjs/commands/UpdateExtensionAssociationCommand.js +1 -28
  44. package/dist-cjs/commands/UpdateExtensionCommand.js +1 -28
  45. package/dist-cjs/commands/ValidateConfigurationCommand.js +1 -28
  46. package/dist-cjs/commands/index.js +1 -46
  47. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  48. package/dist-cjs/extensionConfiguration.js +1 -2
  49. package/dist-cjs/index.js +4004 -11
  50. package/dist-cjs/models/AppConfigServiceException.js +1 -12
  51. package/dist-cjs/models/index.js +1 -4
  52. package/dist-cjs/models/models_0.js +1 -193
  53. package/dist-cjs/pagination/Interfaces.js +1 -2
  54. package/dist-cjs/pagination/ListApplicationsPaginator.js +1 -7
  55. package/dist-cjs/pagination/ListConfigurationProfilesPaginator.js +1 -7
  56. package/dist-cjs/pagination/ListDeploymentStrategiesPaginator.js +1 -7
  57. package/dist-cjs/pagination/ListDeploymentsPaginator.js +1 -7
  58. package/dist-cjs/pagination/ListEnvironmentsPaginator.js +1 -7
  59. package/dist-cjs/pagination/ListExtensionAssociationsPaginator.js +1 -7
  60. package/dist-cjs/pagination/ListExtensionsPaginator.js +1 -7
  61. package/dist-cjs/pagination/ListHostedConfigurationVersionsPaginator.js +1 -7
  62. package/dist-cjs/pagination/index.js +1 -12
  63. package/dist-cjs/protocols/Aws_restJson1.js +1 -2755
  64. package/dist-cjs/runtimeExtensions.js +1 -22
  65. package/package.json +41 -41
@@ -1,2755 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateHostedConfigurationVersionCommand = exports.de_CreateExtensionAssociationCommand = exports.de_CreateExtensionCommand = exports.de_CreateEnvironmentCommand = exports.de_CreateDeploymentStrategyCommand = exports.de_CreateConfigurationProfileCommand = exports.de_CreateApplicationCommand = exports.se_ValidateConfigurationCommand = exports.se_UpdateExtensionAssociationCommand = exports.se_UpdateExtensionCommand = exports.se_UpdateEnvironmentCommand = exports.se_UpdateDeploymentStrategyCommand = exports.se_UpdateConfigurationProfileCommand = exports.se_UpdateApplicationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopDeploymentCommand = exports.se_StartDeploymentCommand = exports.se_ListTagsForResourceCommand = exports.se_ListHostedConfigurationVersionsCommand = exports.se_ListExtensionsCommand = exports.se_ListExtensionAssociationsCommand = exports.se_ListEnvironmentsCommand = exports.se_ListDeploymentStrategiesCommand = exports.se_ListDeploymentsCommand = exports.se_ListConfigurationProfilesCommand = exports.se_ListApplicationsCommand = exports.se_GetHostedConfigurationVersionCommand = exports.se_GetExtensionAssociationCommand = exports.se_GetExtensionCommand = exports.se_GetEnvironmentCommand = exports.se_GetDeploymentStrategyCommand = exports.se_GetDeploymentCommand = exports.se_GetConfigurationProfileCommand = exports.se_GetConfigurationCommand = exports.se_GetApplicationCommand = exports.se_DeleteHostedConfigurationVersionCommand = exports.se_DeleteExtensionAssociationCommand = exports.se_DeleteExtensionCommand = exports.se_DeleteEnvironmentCommand = exports.se_DeleteDeploymentStrategyCommand = exports.se_DeleteConfigurationProfileCommand = exports.se_DeleteApplicationCommand = exports.se_CreateHostedConfigurationVersionCommand = exports.se_CreateExtensionAssociationCommand = exports.se_CreateExtensionCommand = exports.se_CreateEnvironmentCommand = exports.se_CreateDeploymentStrategyCommand = exports.se_CreateConfigurationProfileCommand = exports.se_CreateApplicationCommand = void 0;
4
- exports.de_ValidateConfigurationCommand = exports.de_UpdateExtensionAssociationCommand = exports.de_UpdateExtensionCommand = exports.de_UpdateEnvironmentCommand = exports.de_UpdateDeploymentStrategyCommand = exports.de_UpdateConfigurationProfileCommand = exports.de_UpdateApplicationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopDeploymentCommand = exports.de_StartDeploymentCommand = exports.de_ListTagsForResourceCommand = exports.de_ListHostedConfigurationVersionsCommand = exports.de_ListExtensionsCommand = exports.de_ListExtensionAssociationsCommand = exports.de_ListEnvironmentsCommand = exports.de_ListDeploymentStrategiesCommand = exports.de_ListDeploymentsCommand = exports.de_ListConfigurationProfilesCommand = exports.de_ListApplicationsCommand = exports.de_GetHostedConfigurationVersionCommand = exports.de_GetExtensionAssociationCommand = exports.de_GetExtensionCommand = exports.de_GetEnvironmentCommand = exports.de_GetDeploymentStrategyCommand = exports.de_GetDeploymentCommand = exports.de_GetConfigurationProfileCommand = exports.de_GetConfigurationCommand = exports.de_GetApplicationCommand = exports.de_DeleteHostedConfigurationVersionCommand = exports.de_DeleteExtensionAssociationCommand = exports.de_DeleteExtensionCommand = exports.de_DeleteEnvironmentCommand = exports.de_DeleteDeploymentStrategyCommand = exports.de_DeleteConfigurationProfileCommand = exports.de_DeleteApplicationCommand = void 0;
5
- const core_1 = require("@aws-sdk/core");
6
- const core_2 = require("@smithy/core");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const AppConfigServiceException_1 = require("../models/AppConfigServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_CreateApplicationCommand = async (input, context) => {
11
- const b = (0, core_2.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/applications");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- Description: [],
19
- Name: [],
20
- Tags: (_) => (0, smithy_client_1._json)(_),
21
- }));
22
- b.m("POST").h(headers).b(body);
23
- return b.build();
24
- };
25
- exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
26
- const se_CreateConfigurationProfileCommand = async (input, context) => {
27
- const b = (0, core_2.requestBuilder)(input, context);
28
- const headers = {
29
- "content-type": "application/json",
30
- };
31
- b.bp("/applications/{ApplicationId}/configurationprofiles");
32
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
33
- let body;
34
- body = JSON.stringify((0, smithy_client_1.take)(input, {
35
- Description: [],
36
- KmsKeyIdentifier: [],
37
- LocationUri: [],
38
- Name: [],
39
- RetrievalRoleArn: [],
40
- Tags: (_) => (0, smithy_client_1._json)(_),
41
- Type: [],
42
- Validators: (_) => (0, smithy_client_1._json)(_),
43
- }));
44
- b.m("POST").h(headers).b(body);
45
- return b.build();
46
- };
47
- exports.se_CreateConfigurationProfileCommand = se_CreateConfigurationProfileCommand;
48
- const se_CreateDeploymentStrategyCommand = async (input, context) => {
49
- const b = (0, core_2.requestBuilder)(input, context);
50
- const headers = {
51
- "content-type": "application/json",
52
- };
53
- b.bp("/deploymentstrategies");
54
- let body;
55
- body = JSON.stringify((0, smithy_client_1.take)(input, {
56
- DeploymentDurationInMinutes: [],
57
- Description: [],
58
- FinalBakeTimeInMinutes: [],
59
- GrowthFactor: (_) => (0, smithy_client_1.serializeFloat)(_),
60
- GrowthType: [],
61
- Name: [],
62
- ReplicateTo: [],
63
- Tags: (_) => (0, smithy_client_1._json)(_),
64
- }));
65
- b.m("POST").h(headers).b(body);
66
- return b.build();
67
- };
68
- exports.se_CreateDeploymentStrategyCommand = se_CreateDeploymentStrategyCommand;
69
- const se_CreateEnvironmentCommand = async (input, context) => {
70
- const b = (0, core_2.requestBuilder)(input, context);
71
- const headers = {
72
- "content-type": "application/json",
73
- };
74
- b.bp("/applications/{ApplicationId}/environments");
75
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
76
- let body;
77
- body = JSON.stringify((0, smithy_client_1.take)(input, {
78
- Description: [],
79
- Monitors: (_) => (0, smithy_client_1._json)(_),
80
- Name: [],
81
- Tags: (_) => (0, smithy_client_1._json)(_),
82
- }));
83
- b.m("POST").h(headers).b(body);
84
- return b.build();
85
- };
86
- exports.se_CreateEnvironmentCommand = se_CreateEnvironmentCommand;
87
- const se_CreateExtensionCommand = async (input, context) => {
88
- const b = (0, core_2.requestBuilder)(input, context);
89
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
90
- "content-type": "application/json",
91
- [_lvn]: [() => isSerializableHeaderValue(input[_LVN]), () => input[_LVN].toString()],
92
- });
93
- b.bp("/extensions");
94
- let body;
95
- body = JSON.stringify((0, smithy_client_1.take)(input, {
96
- Actions: (_) => (0, smithy_client_1._json)(_),
97
- Description: [],
98
- Name: [],
99
- Parameters: (_) => (0, smithy_client_1._json)(_),
100
- Tags: (_) => (0, smithy_client_1._json)(_),
101
- }));
102
- b.m("POST").h(headers).b(body);
103
- return b.build();
104
- };
105
- exports.se_CreateExtensionCommand = se_CreateExtensionCommand;
106
- const se_CreateExtensionAssociationCommand = async (input, context) => {
107
- const b = (0, core_2.requestBuilder)(input, context);
108
- const headers = {
109
- "content-type": "application/json",
110
- };
111
- b.bp("/extensionassociations");
112
- let body;
113
- body = JSON.stringify((0, smithy_client_1.take)(input, {
114
- ExtensionIdentifier: [],
115
- ExtensionVersionNumber: [],
116
- Parameters: (_) => (0, smithy_client_1._json)(_),
117
- ResourceIdentifier: [],
118
- Tags: (_) => (0, smithy_client_1._json)(_),
119
- }));
120
- b.m("POST").h(headers).b(body);
121
- return b.build();
122
- };
123
- exports.se_CreateExtensionAssociationCommand = se_CreateExtensionAssociationCommand;
124
- const se_CreateHostedConfigurationVersionCommand = async (input, context) => {
125
- const b = (0, core_2.requestBuilder)(input, context);
126
- const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
127
- [_ct]: input[_CT] || "application/octet-stream",
128
- [_d]: input[_D],
129
- [_lvn]: [() => isSerializableHeaderValue(input[_LVN]), () => input[_LVN].toString()],
130
- [_v]: input[_VL],
131
- });
132
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions");
133
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
134
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
135
- let body;
136
- if (input.Content !== undefined) {
137
- body = input.Content;
138
- }
139
- b.m("POST").h(headers).b(body);
140
- return b.build();
141
- };
142
- exports.se_CreateHostedConfigurationVersionCommand = se_CreateHostedConfigurationVersionCommand;
143
- const se_DeleteApplicationCommand = async (input, context) => {
144
- const b = (0, core_2.requestBuilder)(input, context);
145
- const headers = {};
146
- b.bp("/applications/{ApplicationId}");
147
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
148
- let body;
149
- b.m("DELETE").h(headers).b(body);
150
- return b.build();
151
- };
152
- exports.se_DeleteApplicationCommand = se_DeleteApplicationCommand;
153
- const se_DeleteConfigurationProfileCommand = async (input, context) => {
154
- const b = (0, core_2.requestBuilder)(input, context);
155
- const headers = {};
156
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}");
157
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
158
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
159
- let body;
160
- b.m("DELETE").h(headers).b(body);
161
- return b.build();
162
- };
163
- exports.se_DeleteConfigurationProfileCommand = se_DeleteConfigurationProfileCommand;
164
- const se_DeleteDeploymentStrategyCommand = async (input, context) => {
165
- const b = (0, core_2.requestBuilder)(input, context);
166
- const headers = {};
167
- b.bp("/deployementstrategies/{DeploymentStrategyId}");
168
- b.p("DeploymentStrategyId", () => input.DeploymentStrategyId, "{DeploymentStrategyId}", false);
169
- let body;
170
- b.m("DELETE").h(headers).b(body);
171
- return b.build();
172
- };
173
- exports.se_DeleteDeploymentStrategyCommand = se_DeleteDeploymentStrategyCommand;
174
- const se_DeleteEnvironmentCommand = async (input, context) => {
175
- const b = (0, core_2.requestBuilder)(input, context);
176
- const headers = {};
177
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}");
178
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
179
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
180
- let body;
181
- b.m("DELETE").h(headers).b(body);
182
- return b.build();
183
- };
184
- exports.se_DeleteEnvironmentCommand = se_DeleteEnvironmentCommand;
185
- const se_DeleteExtensionCommand = async (input, context) => {
186
- const b = (0, core_2.requestBuilder)(input, context);
187
- const headers = {};
188
- b.bp("/extensions/{ExtensionIdentifier}");
189
- b.p("ExtensionIdentifier", () => input.ExtensionIdentifier, "{ExtensionIdentifier}", false);
190
- const query = (0, smithy_client_1.map)({
191
- [_ve]: [() => input.VersionNumber !== void 0, () => input[_VN].toString()],
192
- });
193
- let body;
194
- b.m("DELETE").h(headers).q(query).b(body);
195
- return b.build();
196
- };
197
- exports.se_DeleteExtensionCommand = se_DeleteExtensionCommand;
198
- const se_DeleteExtensionAssociationCommand = async (input, context) => {
199
- const b = (0, core_2.requestBuilder)(input, context);
200
- const headers = {};
201
- b.bp("/extensionassociations/{ExtensionAssociationId}");
202
- b.p("ExtensionAssociationId", () => input.ExtensionAssociationId, "{ExtensionAssociationId}", false);
203
- let body;
204
- b.m("DELETE").h(headers).b(body);
205
- return b.build();
206
- };
207
- exports.se_DeleteExtensionAssociationCommand = se_DeleteExtensionAssociationCommand;
208
- const se_DeleteHostedConfigurationVersionCommand = async (input, context) => {
209
- const b = (0, core_2.requestBuilder)(input, context);
210
- const headers = {};
211
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}");
212
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
213
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
214
- b.p("VersionNumber", () => input.VersionNumber.toString(), "{VersionNumber}", false);
215
- let body;
216
- b.m("DELETE").h(headers).b(body);
217
- return b.build();
218
- };
219
- exports.se_DeleteHostedConfigurationVersionCommand = se_DeleteHostedConfigurationVersionCommand;
220
- const se_GetApplicationCommand = async (input, context) => {
221
- const b = (0, core_2.requestBuilder)(input, context);
222
- const headers = {};
223
- b.bp("/applications/{ApplicationId}");
224
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
225
- let body;
226
- b.m("GET").h(headers).b(body);
227
- return b.build();
228
- };
229
- exports.se_GetApplicationCommand = se_GetApplicationCommand;
230
- const se_GetConfigurationCommand = async (input, context) => {
231
- const b = (0, core_2.requestBuilder)(input, context);
232
- const headers = {};
233
- b.bp("/applications/{Application}/environments/{Environment}/configurations/{Configuration}");
234
- b.p("Application", () => input.Application, "{Application}", false);
235
- b.p("Environment", () => input.Environment, "{Environment}", false);
236
- b.p("Configuration", () => input.Configuration, "{Configuration}", false);
237
- const query = (0, smithy_client_1.map)({
238
- [_ci]: [, (0, smithy_client_1.expectNonNull)(input[_CI], `ClientId`)],
239
- [_ccv]: [, input[_CCV]],
240
- });
241
- let body;
242
- b.m("GET").h(headers).q(query).b(body);
243
- return b.build();
244
- };
245
- exports.se_GetConfigurationCommand = se_GetConfigurationCommand;
246
- const se_GetConfigurationProfileCommand = async (input, context) => {
247
- const b = (0, core_2.requestBuilder)(input, context);
248
- const headers = {};
249
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}");
250
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
251
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
252
- let body;
253
- b.m("GET").h(headers).b(body);
254
- return b.build();
255
- };
256
- exports.se_GetConfigurationProfileCommand = se_GetConfigurationProfileCommand;
257
- const se_GetDeploymentCommand = async (input, context) => {
258
- const b = (0, core_2.requestBuilder)(input, context);
259
- const headers = {};
260
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}");
261
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
262
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
263
- b.p("DeploymentNumber", () => input.DeploymentNumber.toString(), "{DeploymentNumber}", false);
264
- let body;
265
- b.m("GET").h(headers).b(body);
266
- return b.build();
267
- };
268
- exports.se_GetDeploymentCommand = se_GetDeploymentCommand;
269
- const se_GetDeploymentStrategyCommand = async (input, context) => {
270
- const b = (0, core_2.requestBuilder)(input, context);
271
- const headers = {};
272
- b.bp("/deploymentstrategies/{DeploymentStrategyId}");
273
- b.p("DeploymentStrategyId", () => input.DeploymentStrategyId, "{DeploymentStrategyId}", false);
274
- let body;
275
- b.m("GET").h(headers).b(body);
276
- return b.build();
277
- };
278
- exports.se_GetDeploymentStrategyCommand = se_GetDeploymentStrategyCommand;
279
- const se_GetEnvironmentCommand = async (input, context) => {
280
- const b = (0, core_2.requestBuilder)(input, context);
281
- const headers = {};
282
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}");
283
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
284
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
285
- let body;
286
- b.m("GET").h(headers).b(body);
287
- return b.build();
288
- };
289
- exports.se_GetEnvironmentCommand = se_GetEnvironmentCommand;
290
- const se_GetExtensionCommand = async (input, context) => {
291
- const b = (0, core_2.requestBuilder)(input, context);
292
- const headers = {};
293
- b.bp("/extensions/{ExtensionIdentifier}");
294
- b.p("ExtensionIdentifier", () => input.ExtensionIdentifier, "{ExtensionIdentifier}", false);
295
- const query = (0, smithy_client_1.map)({
296
- [_vn]: [() => input.VersionNumber !== void 0, () => input[_VN].toString()],
297
- });
298
- let body;
299
- b.m("GET").h(headers).q(query).b(body);
300
- return b.build();
301
- };
302
- exports.se_GetExtensionCommand = se_GetExtensionCommand;
303
- const se_GetExtensionAssociationCommand = async (input, context) => {
304
- const b = (0, core_2.requestBuilder)(input, context);
305
- const headers = {};
306
- b.bp("/extensionassociations/{ExtensionAssociationId}");
307
- b.p("ExtensionAssociationId", () => input.ExtensionAssociationId, "{ExtensionAssociationId}", false);
308
- let body;
309
- b.m("GET").h(headers).b(body);
310
- return b.build();
311
- };
312
- exports.se_GetExtensionAssociationCommand = se_GetExtensionAssociationCommand;
313
- const se_GetHostedConfigurationVersionCommand = async (input, context) => {
314
- const b = (0, core_2.requestBuilder)(input, context);
315
- const headers = {};
316
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}");
317
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
318
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
319
- b.p("VersionNumber", () => input.VersionNumber.toString(), "{VersionNumber}", false);
320
- let body;
321
- b.m("GET").h(headers).b(body);
322
- return b.build();
323
- };
324
- exports.se_GetHostedConfigurationVersionCommand = se_GetHostedConfigurationVersionCommand;
325
- const se_ListApplicationsCommand = async (input, context) => {
326
- const b = (0, core_2.requestBuilder)(input, context);
327
- const headers = {};
328
- b.bp("/applications");
329
- const query = (0, smithy_client_1.map)({
330
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
331
- [_nt]: [, input[_NT]],
332
- });
333
- let body;
334
- b.m("GET").h(headers).q(query).b(body);
335
- return b.build();
336
- };
337
- exports.se_ListApplicationsCommand = se_ListApplicationsCommand;
338
- const se_ListConfigurationProfilesCommand = async (input, context) => {
339
- const b = (0, core_2.requestBuilder)(input, context);
340
- const headers = {};
341
- b.bp("/applications/{ApplicationId}/configurationprofiles");
342
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
343
- const query = (0, smithy_client_1.map)({
344
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
345
- [_nt]: [, input[_NT]],
346
- [_t]: [, input[_T]],
347
- });
348
- let body;
349
- b.m("GET").h(headers).q(query).b(body);
350
- return b.build();
351
- };
352
- exports.se_ListConfigurationProfilesCommand = se_ListConfigurationProfilesCommand;
353
- const se_ListDeploymentsCommand = async (input, context) => {
354
- const b = (0, core_2.requestBuilder)(input, context);
355
- const headers = {};
356
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}/deployments");
357
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
358
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
359
- const query = (0, smithy_client_1.map)({
360
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
361
- [_nt]: [, input[_NT]],
362
- });
363
- let body;
364
- b.m("GET").h(headers).q(query).b(body);
365
- return b.build();
366
- };
367
- exports.se_ListDeploymentsCommand = se_ListDeploymentsCommand;
368
- const se_ListDeploymentStrategiesCommand = async (input, context) => {
369
- const b = (0, core_2.requestBuilder)(input, context);
370
- const headers = {};
371
- b.bp("/deploymentstrategies");
372
- const query = (0, smithy_client_1.map)({
373
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
374
- [_nt]: [, input[_NT]],
375
- });
376
- let body;
377
- b.m("GET").h(headers).q(query).b(body);
378
- return b.build();
379
- };
380
- exports.se_ListDeploymentStrategiesCommand = se_ListDeploymentStrategiesCommand;
381
- const se_ListEnvironmentsCommand = async (input, context) => {
382
- const b = (0, core_2.requestBuilder)(input, context);
383
- const headers = {};
384
- b.bp("/applications/{ApplicationId}/environments");
385
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
386
- const query = (0, smithy_client_1.map)({
387
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
388
- [_nt]: [, input[_NT]],
389
- });
390
- let body;
391
- b.m("GET").h(headers).q(query).b(body);
392
- return b.build();
393
- };
394
- exports.se_ListEnvironmentsCommand = se_ListEnvironmentsCommand;
395
- const se_ListExtensionAssociationsCommand = async (input, context) => {
396
- const b = (0, core_2.requestBuilder)(input, context);
397
- const headers = {};
398
- b.bp("/extensionassociations");
399
- const query = (0, smithy_client_1.map)({
400
- [_ri]: [, input[_RI]],
401
- [_ei]: [, input[_EI]],
402
- [_evn]: [() => input.ExtensionVersionNumber !== void 0, () => input[_EVN].toString()],
403
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
404
- [_nt]: [, input[_NT]],
405
- });
406
- let body;
407
- b.m("GET").h(headers).q(query).b(body);
408
- return b.build();
409
- };
410
- exports.se_ListExtensionAssociationsCommand = se_ListExtensionAssociationsCommand;
411
- const se_ListExtensionsCommand = async (input, context) => {
412
- const b = (0, core_2.requestBuilder)(input, context);
413
- const headers = {};
414
- b.bp("/extensions");
415
- const query = (0, smithy_client_1.map)({
416
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
417
- [_nt]: [, input[_NT]],
418
- [_n]: [, input[_N]],
419
- });
420
- let body;
421
- b.m("GET").h(headers).q(query).b(body);
422
- return b.build();
423
- };
424
- exports.se_ListExtensionsCommand = se_ListExtensionsCommand;
425
- const se_ListHostedConfigurationVersionsCommand = async (input, context) => {
426
- const b = (0, core_2.requestBuilder)(input, context);
427
- const headers = {};
428
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions");
429
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
430
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
431
- const query = (0, smithy_client_1.map)({
432
- [_mr]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
433
- [_nt]: [, input[_NT]],
434
- [_vl]: [, input[_VL]],
435
- });
436
- let body;
437
- b.m("GET").h(headers).q(query).b(body);
438
- return b.build();
439
- };
440
- exports.se_ListHostedConfigurationVersionsCommand = se_ListHostedConfigurationVersionsCommand;
441
- const se_ListTagsForResourceCommand = async (input, context) => {
442
- const b = (0, core_2.requestBuilder)(input, context);
443
- const headers = {};
444
- b.bp("/tags/{ResourceArn}");
445
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
446
- let body;
447
- b.m("GET").h(headers).b(body);
448
- return b.build();
449
- };
450
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
451
- const se_StartDeploymentCommand = async (input, context) => {
452
- const b = (0, core_2.requestBuilder)(input, context);
453
- const headers = {
454
- "content-type": "application/json",
455
- };
456
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}/deployments");
457
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
458
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
459
- let body;
460
- body = JSON.stringify((0, smithy_client_1.take)(input, {
461
- ConfigurationProfileId: [],
462
- ConfigurationVersion: [],
463
- DeploymentStrategyId: [],
464
- Description: [],
465
- KmsKeyIdentifier: [],
466
- Tags: (_) => (0, smithy_client_1._json)(_),
467
- }));
468
- b.m("POST").h(headers).b(body);
469
- return b.build();
470
- };
471
- exports.se_StartDeploymentCommand = se_StartDeploymentCommand;
472
- const se_StopDeploymentCommand = async (input, context) => {
473
- const b = (0, core_2.requestBuilder)(input, context);
474
- const headers = {};
475
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}");
476
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
477
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
478
- b.p("DeploymentNumber", () => input.DeploymentNumber.toString(), "{DeploymentNumber}", false);
479
- let body;
480
- b.m("DELETE").h(headers).b(body);
481
- return b.build();
482
- };
483
- exports.se_StopDeploymentCommand = se_StopDeploymentCommand;
484
- const se_TagResourceCommand = async (input, context) => {
485
- const b = (0, core_2.requestBuilder)(input, context);
486
- const headers = {
487
- "content-type": "application/json",
488
- };
489
- b.bp("/tags/{ResourceArn}");
490
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
491
- let body;
492
- body = JSON.stringify((0, smithy_client_1.take)(input, {
493
- Tags: (_) => (0, smithy_client_1._json)(_),
494
- }));
495
- b.m("POST").h(headers).b(body);
496
- return b.build();
497
- };
498
- exports.se_TagResourceCommand = se_TagResourceCommand;
499
- const se_UntagResourceCommand = async (input, context) => {
500
- const b = (0, core_2.requestBuilder)(input, context);
501
- const headers = {};
502
- b.bp("/tags/{ResourceArn}");
503
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
504
- const query = (0, smithy_client_1.map)({
505
- [_tK]: [
506
- (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
507
- () => (input[_TK] || []).map((_entry) => _entry),
508
- ],
509
- });
510
- let body;
511
- b.m("DELETE").h(headers).q(query).b(body);
512
- return b.build();
513
- };
514
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
515
- const se_UpdateApplicationCommand = async (input, context) => {
516
- const b = (0, core_2.requestBuilder)(input, context);
517
- const headers = {
518
- "content-type": "application/json",
519
- };
520
- b.bp("/applications/{ApplicationId}");
521
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
522
- let body;
523
- body = JSON.stringify((0, smithy_client_1.take)(input, {
524
- Description: [],
525
- Name: [],
526
- }));
527
- b.m("PATCH").h(headers).b(body);
528
- return b.build();
529
- };
530
- exports.se_UpdateApplicationCommand = se_UpdateApplicationCommand;
531
- const se_UpdateConfigurationProfileCommand = async (input, context) => {
532
- const b = (0, core_2.requestBuilder)(input, context);
533
- const headers = {
534
- "content-type": "application/json",
535
- };
536
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}");
537
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
538
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
539
- let body;
540
- body = JSON.stringify((0, smithy_client_1.take)(input, {
541
- Description: [],
542
- KmsKeyIdentifier: [],
543
- Name: [],
544
- RetrievalRoleArn: [],
545
- Validators: (_) => (0, smithy_client_1._json)(_),
546
- }));
547
- b.m("PATCH").h(headers).b(body);
548
- return b.build();
549
- };
550
- exports.se_UpdateConfigurationProfileCommand = se_UpdateConfigurationProfileCommand;
551
- const se_UpdateDeploymentStrategyCommand = async (input, context) => {
552
- const b = (0, core_2.requestBuilder)(input, context);
553
- const headers = {
554
- "content-type": "application/json",
555
- };
556
- b.bp("/deploymentstrategies/{DeploymentStrategyId}");
557
- b.p("DeploymentStrategyId", () => input.DeploymentStrategyId, "{DeploymentStrategyId}", false);
558
- let body;
559
- body = JSON.stringify((0, smithy_client_1.take)(input, {
560
- DeploymentDurationInMinutes: [],
561
- Description: [],
562
- FinalBakeTimeInMinutes: [],
563
- GrowthFactor: (_) => (0, smithy_client_1.serializeFloat)(_),
564
- GrowthType: [],
565
- }));
566
- b.m("PATCH").h(headers).b(body);
567
- return b.build();
568
- };
569
- exports.se_UpdateDeploymentStrategyCommand = se_UpdateDeploymentStrategyCommand;
570
- const se_UpdateEnvironmentCommand = async (input, context) => {
571
- const b = (0, core_2.requestBuilder)(input, context);
572
- const headers = {
573
- "content-type": "application/json",
574
- };
575
- b.bp("/applications/{ApplicationId}/environments/{EnvironmentId}");
576
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
577
- b.p("EnvironmentId", () => input.EnvironmentId, "{EnvironmentId}", false);
578
- let body;
579
- body = JSON.stringify((0, smithy_client_1.take)(input, {
580
- Description: [],
581
- Monitors: (_) => (0, smithy_client_1._json)(_),
582
- Name: [],
583
- }));
584
- b.m("PATCH").h(headers).b(body);
585
- return b.build();
586
- };
587
- exports.se_UpdateEnvironmentCommand = se_UpdateEnvironmentCommand;
588
- const se_UpdateExtensionCommand = async (input, context) => {
589
- const b = (0, core_2.requestBuilder)(input, context);
590
- const headers = {
591
- "content-type": "application/json",
592
- };
593
- b.bp("/extensions/{ExtensionIdentifier}");
594
- b.p("ExtensionIdentifier", () => input.ExtensionIdentifier, "{ExtensionIdentifier}", false);
595
- let body;
596
- body = JSON.stringify((0, smithy_client_1.take)(input, {
597
- Actions: (_) => (0, smithy_client_1._json)(_),
598
- Description: [],
599
- Parameters: (_) => (0, smithy_client_1._json)(_),
600
- VersionNumber: [],
601
- }));
602
- b.m("PATCH").h(headers).b(body);
603
- return b.build();
604
- };
605
- exports.se_UpdateExtensionCommand = se_UpdateExtensionCommand;
606
- const se_UpdateExtensionAssociationCommand = async (input, context) => {
607
- const b = (0, core_2.requestBuilder)(input, context);
608
- const headers = {
609
- "content-type": "application/json",
610
- };
611
- b.bp("/extensionassociations/{ExtensionAssociationId}");
612
- b.p("ExtensionAssociationId", () => input.ExtensionAssociationId, "{ExtensionAssociationId}", false);
613
- let body;
614
- body = JSON.stringify((0, smithy_client_1.take)(input, {
615
- Parameters: (_) => (0, smithy_client_1._json)(_),
616
- }));
617
- b.m("PATCH").h(headers).b(body);
618
- return b.build();
619
- };
620
- exports.se_UpdateExtensionAssociationCommand = se_UpdateExtensionAssociationCommand;
621
- const se_ValidateConfigurationCommand = async (input, context) => {
622
- const b = (0, core_2.requestBuilder)(input, context);
623
- const headers = {};
624
- b.bp("/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/validators");
625
- b.p("ApplicationId", () => input.ApplicationId, "{ApplicationId}", false);
626
- b.p("ConfigurationProfileId", () => input.ConfigurationProfileId, "{ConfigurationProfileId}", false);
627
- const query = (0, smithy_client_1.map)({
628
- [_cv]: [, (0, smithy_client_1.expectNonNull)(input[_CV], `ConfigurationVersion`)],
629
- });
630
- let body;
631
- b.m("POST").h(headers).q(query).b(body);
632
- return b.build();
633
- };
634
- exports.se_ValidateConfigurationCommand = se_ValidateConfigurationCommand;
635
- const de_CreateApplicationCommand = async (output, context) => {
636
- if (output.statusCode !== 201 && output.statusCode >= 300) {
637
- return de_CreateApplicationCommandError(output, context);
638
- }
639
- const contents = (0, smithy_client_1.map)({
640
- $metadata: deserializeMetadata(output),
641
- });
642
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
643
- const doc = (0, smithy_client_1.take)(data, {
644
- Description: smithy_client_1.expectString,
645
- Id: smithy_client_1.expectString,
646
- Name: smithy_client_1.expectString,
647
- });
648
- Object.assign(contents, doc);
649
- return contents;
650
- };
651
- exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
652
- const de_CreateApplicationCommandError = async (output, context) => {
653
- const parsedOutput = {
654
- ...output,
655
- body: await parseErrorBody(output.body, context),
656
- };
657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
658
- switch (errorCode) {
659
- case "BadRequestException":
660
- case "com.amazonaws.appconfig#BadRequestException":
661
- throw await de_BadRequestExceptionRes(parsedOutput, context);
662
- case "InternalServerException":
663
- case "com.amazonaws.appconfig#InternalServerException":
664
- throw await de_InternalServerExceptionRes(parsedOutput, context);
665
- case "ServiceQuotaExceededException":
666
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
667
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
668
- default:
669
- const parsedBody = parsedOutput.body;
670
- return throwDefaultError({
671
- output,
672
- parsedBody,
673
- errorCode,
674
- });
675
- }
676
- };
677
- const de_CreateConfigurationProfileCommand = async (output, context) => {
678
- if (output.statusCode !== 201 && output.statusCode >= 300) {
679
- return de_CreateConfigurationProfileCommandError(output, context);
680
- }
681
- const contents = (0, smithy_client_1.map)({
682
- $metadata: deserializeMetadata(output),
683
- });
684
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
685
- const doc = (0, smithy_client_1.take)(data, {
686
- ApplicationId: smithy_client_1.expectString,
687
- Description: smithy_client_1.expectString,
688
- Id: smithy_client_1.expectString,
689
- KmsKeyArn: smithy_client_1.expectString,
690
- KmsKeyIdentifier: smithy_client_1.expectString,
691
- LocationUri: smithy_client_1.expectString,
692
- Name: smithy_client_1.expectString,
693
- RetrievalRoleArn: smithy_client_1.expectString,
694
- Type: smithy_client_1.expectString,
695
- Validators: smithy_client_1._json,
696
- });
697
- Object.assign(contents, doc);
698
- return contents;
699
- };
700
- exports.de_CreateConfigurationProfileCommand = de_CreateConfigurationProfileCommand;
701
- const de_CreateConfigurationProfileCommandError = async (output, context) => {
702
- const parsedOutput = {
703
- ...output,
704
- body: await parseErrorBody(output.body, context),
705
- };
706
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
707
- switch (errorCode) {
708
- case "BadRequestException":
709
- case "com.amazonaws.appconfig#BadRequestException":
710
- throw await de_BadRequestExceptionRes(parsedOutput, context);
711
- case "InternalServerException":
712
- case "com.amazonaws.appconfig#InternalServerException":
713
- throw await de_InternalServerExceptionRes(parsedOutput, context);
714
- case "ResourceNotFoundException":
715
- case "com.amazonaws.appconfig#ResourceNotFoundException":
716
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
717
- case "ServiceQuotaExceededException":
718
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
719
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
720
- default:
721
- const parsedBody = parsedOutput.body;
722
- return throwDefaultError({
723
- output,
724
- parsedBody,
725
- errorCode,
726
- });
727
- }
728
- };
729
- const de_CreateDeploymentStrategyCommand = async (output, context) => {
730
- if (output.statusCode !== 201 && output.statusCode >= 300) {
731
- return de_CreateDeploymentStrategyCommandError(output, context);
732
- }
733
- const contents = (0, smithy_client_1.map)({
734
- $metadata: deserializeMetadata(output),
735
- });
736
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
737
- const doc = (0, smithy_client_1.take)(data, {
738
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
739
- Description: smithy_client_1.expectString,
740
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
741
- GrowthFactor: smithy_client_1.limitedParseFloat32,
742
- GrowthType: smithy_client_1.expectString,
743
- Id: smithy_client_1.expectString,
744
- Name: smithy_client_1.expectString,
745
- ReplicateTo: smithy_client_1.expectString,
746
- });
747
- Object.assign(contents, doc);
748
- return contents;
749
- };
750
- exports.de_CreateDeploymentStrategyCommand = de_CreateDeploymentStrategyCommand;
751
- const de_CreateDeploymentStrategyCommandError = async (output, context) => {
752
- const parsedOutput = {
753
- ...output,
754
- body: await parseErrorBody(output.body, context),
755
- };
756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
757
- switch (errorCode) {
758
- case "BadRequestException":
759
- case "com.amazonaws.appconfig#BadRequestException":
760
- throw await de_BadRequestExceptionRes(parsedOutput, context);
761
- case "InternalServerException":
762
- case "com.amazonaws.appconfig#InternalServerException":
763
- throw await de_InternalServerExceptionRes(parsedOutput, context);
764
- case "ServiceQuotaExceededException":
765
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
766
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
767
- default:
768
- const parsedBody = parsedOutput.body;
769
- return throwDefaultError({
770
- output,
771
- parsedBody,
772
- errorCode,
773
- });
774
- }
775
- };
776
- const de_CreateEnvironmentCommand = async (output, context) => {
777
- if (output.statusCode !== 201 && output.statusCode >= 300) {
778
- return de_CreateEnvironmentCommandError(output, context);
779
- }
780
- const contents = (0, smithy_client_1.map)({
781
- $metadata: deserializeMetadata(output),
782
- });
783
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
784
- const doc = (0, smithy_client_1.take)(data, {
785
- ApplicationId: smithy_client_1.expectString,
786
- Description: smithy_client_1.expectString,
787
- Id: smithy_client_1.expectString,
788
- Monitors: smithy_client_1._json,
789
- Name: smithy_client_1.expectString,
790
- State: smithy_client_1.expectString,
791
- });
792
- Object.assign(contents, doc);
793
- return contents;
794
- };
795
- exports.de_CreateEnvironmentCommand = de_CreateEnvironmentCommand;
796
- const de_CreateEnvironmentCommandError = async (output, context) => {
797
- const parsedOutput = {
798
- ...output,
799
- body: await parseErrorBody(output.body, context),
800
- };
801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
802
- switch (errorCode) {
803
- case "BadRequestException":
804
- case "com.amazonaws.appconfig#BadRequestException":
805
- throw await de_BadRequestExceptionRes(parsedOutput, context);
806
- case "InternalServerException":
807
- case "com.amazonaws.appconfig#InternalServerException":
808
- throw await de_InternalServerExceptionRes(parsedOutput, context);
809
- case "ResourceNotFoundException":
810
- case "com.amazonaws.appconfig#ResourceNotFoundException":
811
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
812
- case "ServiceQuotaExceededException":
813
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
814
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
815
- default:
816
- const parsedBody = parsedOutput.body;
817
- return throwDefaultError({
818
- output,
819
- parsedBody,
820
- errorCode,
821
- });
822
- }
823
- };
824
- const de_CreateExtensionCommand = async (output, context) => {
825
- if (output.statusCode !== 201 && output.statusCode >= 300) {
826
- return de_CreateExtensionCommandError(output, context);
827
- }
828
- const contents = (0, smithy_client_1.map)({
829
- $metadata: deserializeMetadata(output),
830
- });
831
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
832
- const doc = (0, smithy_client_1.take)(data, {
833
- Actions: smithy_client_1._json,
834
- Arn: smithy_client_1.expectString,
835
- Description: smithy_client_1.expectString,
836
- Id: smithy_client_1.expectString,
837
- Name: smithy_client_1.expectString,
838
- Parameters: smithy_client_1._json,
839
- VersionNumber: smithy_client_1.expectInt32,
840
- });
841
- Object.assign(contents, doc);
842
- return contents;
843
- };
844
- exports.de_CreateExtensionCommand = de_CreateExtensionCommand;
845
- const de_CreateExtensionCommandError = async (output, context) => {
846
- const parsedOutput = {
847
- ...output,
848
- body: await parseErrorBody(output.body, context),
849
- };
850
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
851
- switch (errorCode) {
852
- case "BadRequestException":
853
- case "com.amazonaws.appconfig#BadRequestException":
854
- throw await de_BadRequestExceptionRes(parsedOutput, context);
855
- case "ConflictException":
856
- case "com.amazonaws.appconfig#ConflictException":
857
- throw await de_ConflictExceptionRes(parsedOutput, context);
858
- case "InternalServerException":
859
- case "com.amazonaws.appconfig#InternalServerException":
860
- throw await de_InternalServerExceptionRes(parsedOutput, context);
861
- case "ServiceQuotaExceededException":
862
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
863
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
864
- default:
865
- const parsedBody = parsedOutput.body;
866
- return throwDefaultError({
867
- output,
868
- parsedBody,
869
- errorCode,
870
- });
871
- }
872
- };
873
- const de_CreateExtensionAssociationCommand = async (output, context) => {
874
- if (output.statusCode !== 201 && output.statusCode >= 300) {
875
- return de_CreateExtensionAssociationCommandError(output, context);
876
- }
877
- const contents = (0, smithy_client_1.map)({
878
- $metadata: deserializeMetadata(output),
879
- });
880
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
881
- const doc = (0, smithy_client_1.take)(data, {
882
- Arn: smithy_client_1.expectString,
883
- ExtensionArn: smithy_client_1.expectString,
884
- ExtensionVersionNumber: smithy_client_1.expectInt32,
885
- Id: smithy_client_1.expectString,
886
- Parameters: smithy_client_1._json,
887
- ResourceArn: smithy_client_1.expectString,
888
- });
889
- Object.assign(contents, doc);
890
- return contents;
891
- };
892
- exports.de_CreateExtensionAssociationCommand = de_CreateExtensionAssociationCommand;
893
- const de_CreateExtensionAssociationCommandError = async (output, context) => {
894
- const parsedOutput = {
895
- ...output,
896
- body: await parseErrorBody(output.body, context),
897
- };
898
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
899
- switch (errorCode) {
900
- case "BadRequestException":
901
- case "com.amazonaws.appconfig#BadRequestException":
902
- throw await de_BadRequestExceptionRes(parsedOutput, context);
903
- case "InternalServerException":
904
- case "com.amazonaws.appconfig#InternalServerException":
905
- throw await de_InternalServerExceptionRes(parsedOutput, context);
906
- case "ResourceNotFoundException":
907
- case "com.amazonaws.appconfig#ResourceNotFoundException":
908
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
909
- case "ServiceQuotaExceededException":
910
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
911
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
912
- default:
913
- const parsedBody = parsedOutput.body;
914
- return throwDefaultError({
915
- output,
916
- parsedBody,
917
- errorCode,
918
- });
919
- }
920
- };
921
- const de_CreateHostedConfigurationVersionCommand = async (output, context) => {
922
- if (output.statusCode !== 201 && output.statusCode >= 300) {
923
- return de_CreateHostedConfigurationVersionCommandError(output, context);
924
- }
925
- const contents = (0, smithy_client_1.map)({
926
- $metadata: deserializeMetadata(output),
927
- [_AI]: [, output.headers[_ai]],
928
- [_CPI]: [, output.headers[_cpi]],
929
- [_VN]: [() => void 0 !== output.headers[_vn_], () => (0, smithy_client_1.strictParseInt32)(output.headers[_vn_])],
930
- [_D]: [, output.headers[_d]],
931
- [_CT]: [, output.headers[_ct]],
932
- [_VL]: [, output.headers[_v]],
933
- [_KKA]: [, output.headers[_k]],
934
- });
935
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
936
- contents.Content = data;
937
- return contents;
938
- };
939
- exports.de_CreateHostedConfigurationVersionCommand = de_CreateHostedConfigurationVersionCommand;
940
- const de_CreateHostedConfigurationVersionCommandError = async (output, context) => {
941
- const parsedOutput = {
942
- ...output,
943
- body: await parseErrorBody(output.body, context),
944
- };
945
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
946
- switch (errorCode) {
947
- case "BadRequestException":
948
- case "com.amazonaws.appconfig#BadRequestException":
949
- throw await de_BadRequestExceptionRes(parsedOutput, context);
950
- case "ConflictException":
951
- case "com.amazonaws.appconfig#ConflictException":
952
- throw await de_ConflictExceptionRes(parsedOutput, context);
953
- case "InternalServerException":
954
- case "com.amazonaws.appconfig#InternalServerException":
955
- throw await de_InternalServerExceptionRes(parsedOutput, context);
956
- case "PayloadTooLargeException":
957
- case "com.amazonaws.appconfig#PayloadTooLargeException":
958
- throw await de_PayloadTooLargeExceptionRes(parsedOutput, context);
959
- case "ResourceNotFoundException":
960
- case "com.amazonaws.appconfig#ResourceNotFoundException":
961
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
962
- case "ServiceQuotaExceededException":
963
- case "com.amazonaws.appconfig#ServiceQuotaExceededException":
964
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
965
- default:
966
- const parsedBody = parsedOutput.body;
967
- return throwDefaultError({
968
- output,
969
- parsedBody,
970
- errorCode,
971
- });
972
- }
973
- };
974
- const de_DeleteApplicationCommand = async (output, context) => {
975
- if (output.statusCode !== 204 && output.statusCode >= 300) {
976
- return de_DeleteApplicationCommandError(output, context);
977
- }
978
- const contents = (0, smithy_client_1.map)({
979
- $metadata: deserializeMetadata(output),
980
- });
981
- await (0, smithy_client_1.collectBody)(output.body, context);
982
- return contents;
983
- };
984
- exports.de_DeleteApplicationCommand = de_DeleteApplicationCommand;
985
- const de_DeleteApplicationCommandError = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseErrorBody(output.body, context),
989
- };
990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "BadRequestException":
993
- case "com.amazonaws.appconfig#BadRequestException":
994
- throw await de_BadRequestExceptionRes(parsedOutput, context);
995
- case "InternalServerException":
996
- case "com.amazonaws.appconfig#InternalServerException":
997
- throw await de_InternalServerExceptionRes(parsedOutput, context);
998
- case "ResourceNotFoundException":
999
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1000
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1001
- default:
1002
- const parsedBody = parsedOutput.body;
1003
- return throwDefaultError({
1004
- output,
1005
- parsedBody,
1006
- errorCode,
1007
- });
1008
- }
1009
- };
1010
- const de_DeleteConfigurationProfileCommand = async (output, context) => {
1011
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1012
- return de_DeleteConfigurationProfileCommandError(output, context);
1013
- }
1014
- const contents = (0, smithy_client_1.map)({
1015
- $metadata: deserializeMetadata(output),
1016
- });
1017
- await (0, smithy_client_1.collectBody)(output.body, context);
1018
- return contents;
1019
- };
1020
- exports.de_DeleteConfigurationProfileCommand = de_DeleteConfigurationProfileCommand;
1021
- const de_DeleteConfigurationProfileCommandError = async (output, context) => {
1022
- const parsedOutput = {
1023
- ...output,
1024
- body: await parseErrorBody(output.body, context),
1025
- };
1026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1027
- switch (errorCode) {
1028
- case "BadRequestException":
1029
- case "com.amazonaws.appconfig#BadRequestException":
1030
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1031
- case "ConflictException":
1032
- case "com.amazonaws.appconfig#ConflictException":
1033
- throw await de_ConflictExceptionRes(parsedOutput, context);
1034
- case "InternalServerException":
1035
- case "com.amazonaws.appconfig#InternalServerException":
1036
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1037
- case "ResourceNotFoundException":
1038
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1039
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1040
- default:
1041
- const parsedBody = parsedOutput.body;
1042
- return throwDefaultError({
1043
- output,
1044
- parsedBody,
1045
- errorCode,
1046
- });
1047
- }
1048
- };
1049
- const de_DeleteDeploymentStrategyCommand = async (output, context) => {
1050
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1051
- return de_DeleteDeploymentStrategyCommandError(output, context);
1052
- }
1053
- const contents = (0, smithy_client_1.map)({
1054
- $metadata: deserializeMetadata(output),
1055
- });
1056
- await (0, smithy_client_1.collectBody)(output.body, context);
1057
- return contents;
1058
- };
1059
- exports.de_DeleteDeploymentStrategyCommand = de_DeleteDeploymentStrategyCommand;
1060
- const de_DeleteDeploymentStrategyCommandError = async (output, context) => {
1061
- const parsedOutput = {
1062
- ...output,
1063
- body: await parseErrorBody(output.body, context),
1064
- };
1065
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1066
- switch (errorCode) {
1067
- case "BadRequestException":
1068
- case "com.amazonaws.appconfig#BadRequestException":
1069
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1070
- case "InternalServerException":
1071
- case "com.amazonaws.appconfig#InternalServerException":
1072
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1073
- case "ResourceNotFoundException":
1074
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1075
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1076
- default:
1077
- const parsedBody = parsedOutput.body;
1078
- return throwDefaultError({
1079
- output,
1080
- parsedBody,
1081
- errorCode,
1082
- });
1083
- }
1084
- };
1085
- const de_DeleteEnvironmentCommand = async (output, context) => {
1086
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1087
- return de_DeleteEnvironmentCommandError(output, context);
1088
- }
1089
- const contents = (0, smithy_client_1.map)({
1090
- $metadata: deserializeMetadata(output),
1091
- });
1092
- await (0, smithy_client_1.collectBody)(output.body, context);
1093
- return contents;
1094
- };
1095
- exports.de_DeleteEnvironmentCommand = de_DeleteEnvironmentCommand;
1096
- const de_DeleteEnvironmentCommandError = async (output, context) => {
1097
- const parsedOutput = {
1098
- ...output,
1099
- body: await parseErrorBody(output.body, context),
1100
- };
1101
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1102
- switch (errorCode) {
1103
- case "BadRequestException":
1104
- case "com.amazonaws.appconfig#BadRequestException":
1105
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1106
- case "ConflictException":
1107
- case "com.amazonaws.appconfig#ConflictException":
1108
- throw await de_ConflictExceptionRes(parsedOutput, context);
1109
- case "InternalServerException":
1110
- case "com.amazonaws.appconfig#InternalServerException":
1111
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1112
- case "ResourceNotFoundException":
1113
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1114
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1115
- default:
1116
- const parsedBody = parsedOutput.body;
1117
- return throwDefaultError({
1118
- output,
1119
- parsedBody,
1120
- errorCode,
1121
- });
1122
- }
1123
- };
1124
- const de_DeleteExtensionCommand = async (output, context) => {
1125
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1126
- return de_DeleteExtensionCommandError(output, context);
1127
- }
1128
- const contents = (0, smithy_client_1.map)({
1129
- $metadata: deserializeMetadata(output),
1130
- });
1131
- await (0, smithy_client_1.collectBody)(output.body, context);
1132
- return contents;
1133
- };
1134
- exports.de_DeleteExtensionCommand = de_DeleteExtensionCommand;
1135
- const de_DeleteExtensionCommandError = async (output, context) => {
1136
- const parsedOutput = {
1137
- ...output,
1138
- body: await parseErrorBody(output.body, context),
1139
- };
1140
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1141
- switch (errorCode) {
1142
- case "BadRequestException":
1143
- case "com.amazonaws.appconfig#BadRequestException":
1144
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1145
- case "InternalServerException":
1146
- case "com.amazonaws.appconfig#InternalServerException":
1147
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1148
- case "ResourceNotFoundException":
1149
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1150
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1151
- default:
1152
- const parsedBody = parsedOutput.body;
1153
- return throwDefaultError({
1154
- output,
1155
- parsedBody,
1156
- errorCode,
1157
- });
1158
- }
1159
- };
1160
- const de_DeleteExtensionAssociationCommand = async (output, context) => {
1161
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1162
- return de_DeleteExtensionAssociationCommandError(output, context);
1163
- }
1164
- const contents = (0, smithy_client_1.map)({
1165
- $metadata: deserializeMetadata(output),
1166
- });
1167
- await (0, smithy_client_1.collectBody)(output.body, context);
1168
- return contents;
1169
- };
1170
- exports.de_DeleteExtensionAssociationCommand = de_DeleteExtensionAssociationCommand;
1171
- const de_DeleteExtensionAssociationCommandError = async (output, context) => {
1172
- const parsedOutput = {
1173
- ...output,
1174
- body: await parseErrorBody(output.body, context),
1175
- };
1176
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1177
- switch (errorCode) {
1178
- case "BadRequestException":
1179
- case "com.amazonaws.appconfig#BadRequestException":
1180
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1181
- case "InternalServerException":
1182
- case "com.amazonaws.appconfig#InternalServerException":
1183
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1184
- case "ResourceNotFoundException":
1185
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1186
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1187
- default:
1188
- const parsedBody = parsedOutput.body;
1189
- return throwDefaultError({
1190
- output,
1191
- parsedBody,
1192
- errorCode,
1193
- });
1194
- }
1195
- };
1196
- const de_DeleteHostedConfigurationVersionCommand = async (output, context) => {
1197
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1198
- return de_DeleteHostedConfigurationVersionCommandError(output, context);
1199
- }
1200
- const contents = (0, smithy_client_1.map)({
1201
- $metadata: deserializeMetadata(output),
1202
- });
1203
- await (0, smithy_client_1.collectBody)(output.body, context);
1204
- return contents;
1205
- };
1206
- exports.de_DeleteHostedConfigurationVersionCommand = de_DeleteHostedConfigurationVersionCommand;
1207
- const de_DeleteHostedConfigurationVersionCommandError = async (output, context) => {
1208
- const parsedOutput = {
1209
- ...output,
1210
- body: await parseErrorBody(output.body, context),
1211
- };
1212
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1213
- switch (errorCode) {
1214
- case "BadRequestException":
1215
- case "com.amazonaws.appconfig#BadRequestException":
1216
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1217
- case "InternalServerException":
1218
- case "com.amazonaws.appconfig#InternalServerException":
1219
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1220
- case "ResourceNotFoundException":
1221
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1222
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1223
- default:
1224
- const parsedBody = parsedOutput.body;
1225
- return throwDefaultError({
1226
- output,
1227
- parsedBody,
1228
- errorCode,
1229
- });
1230
- }
1231
- };
1232
- const de_GetApplicationCommand = async (output, context) => {
1233
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1234
- return de_GetApplicationCommandError(output, context);
1235
- }
1236
- const contents = (0, smithy_client_1.map)({
1237
- $metadata: deserializeMetadata(output),
1238
- });
1239
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1240
- const doc = (0, smithy_client_1.take)(data, {
1241
- Description: smithy_client_1.expectString,
1242
- Id: smithy_client_1.expectString,
1243
- Name: smithy_client_1.expectString,
1244
- });
1245
- Object.assign(contents, doc);
1246
- return contents;
1247
- };
1248
- exports.de_GetApplicationCommand = de_GetApplicationCommand;
1249
- const de_GetApplicationCommandError = async (output, context) => {
1250
- const parsedOutput = {
1251
- ...output,
1252
- body: await parseErrorBody(output.body, context),
1253
- };
1254
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1255
- switch (errorCode) {
1256
- case "BadRequestException":
1257
- case "com.amazonaws.appconfig#BadRequestException":
1258
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1259
- case "InternalServerException":
1260
- case "com.amazonaws.appconfig#InternalServerException":
1261
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1262
- case "ResourceNotFoundException":
1263
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1265
- default:
1266
- const parsedBody = parsedOutput.body;
1267
- return throwDefaultError({
1268
- output,
1269
- parsedBody,
1270
- errorCode,
1271
- });
1272
- }
1273
- };
1274
- const de_GetConfigurationCommand = async (output, context) => {
1275
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1276
- return de_GetConfigurationCommandError(output, context);
1277
- }
1278
- const contents = (0, smithy_client_1.map)({
1279
- $metadata: deserializeMetadata(output),
1280
- [_CV]: [, output.headers[_cv_]],
1281
- [_CT]: [, output.headers[_ct]],
1282
- });
1283
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
1284
- contents.Content = data;
1285
- return contents;
1286
- };
1287
- exports.de_GetConfigurationCommand = de_GetConfigurationCommand;
1288
- const de_GetConfigurationCommandError = async (output, context) => {
1289
- const parsedOutput = {
1290
- ...output,
1291
- body: await parseErrorBody(output.body, context),
1292
- };
1293
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1294
- switch (errorCode) {
1295
- case "BadRequestException":
1296
- case "com.amazonaws.appconfig#BadRequestException":
1297
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1298
- case "InternalServerException":
1299
- case "com.amazonaws.appconfig#InternalServerException":
1300
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1301
- case "ResourceNotFoundException":
1302
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1303
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1304
- default:
1305
- const parsedBody = parsedOutput.body;
1306
- return throwDefaultError({
1307
- output,
1308
- parsedBody,
1309
- errorCode,
1310
- });
1311
- }
1312
- };
1313
- const de_GetConfigurationProfileCommand = async (output, context) => {
1314
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1315
- return de_GetConfigurationProfileCommandError(output, context);
1316
- }
1317
- const contents = (0, smithy_client_1.map)({
1318
- $metadata: deserializeMetadata(output),
1319
- });
1320
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1321
- const doc = (0, smithy_client_1.take)(data, {
1322
- ApplicationId: smithy_client_1.expectString,
1323
- Description: smithy_client_1.expectString,
1324
- Id: smithy_client_1.expectString,
1325
- KmsKeyArn: smithy_client_1.expectString,
1326
- KmsKeyIdentifier: smithy_client_1.expectString,
1327
- LocationUri: smithy_client_1.expectString,
1328
- Name: smithy_client_1.expectString,
1329
- RetrievalRoleArn: smithy_client_1.expectString,
1330
- Type: smithy_client_1.expectString,
1331
- Validators: smithy_client_1._json,
1332
- });
1333
- Object.assign(contents, doc);
1334
- return contents;
1335
- };
1336
- exports.de_GetConfigurationProfileCommand = de_GetConfigurationProfileCommand;
1337
- const de_GetConfigurationProfileCommandError = async (output, context) => {
1338
- const parsedOutput = {
1339
- ...output,
1340
- body: await parseErrorBody(output.body, context),
1341
- };
1342
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1343
- switch (errorCode) {
1344
- case "BadRequestException":
1345
- case "com.amazonaws.appconfig#BadRequestException":
1346
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1347
- case "InternalServerException":
1348
- case "com.amazonaws.appconfig#InternalServerException":
1349
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1350
- case "ResourceNotFoundException":
1351
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1352
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1353
- default:
1354
- const parsedBody = parsedOutput.body;
1355
- return throwDefaultError({
1356
- output,
1357
- parsedBody,
1358
- errorCode,
1359
- });
1360
- }
1361
- };
1362
- const de_GetDeploymentCommand = async (output, context) => {
1363
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1364
- return de_GetDeploymentCommandError(output, context);
1365
- }
1366
- const contents = (0, smithy_client_1.map)({
1367
- $metadata: deserializeMetadata(output),
1368
- });
1369
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1370
- const doc = (0, smithy_client_1.take)(data, {
1371
- ApplicationId: smithy_client_1.expectString,
1372
- AppliedExtensions: smithy_client_1._json,
1373
- CompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1374
- ConfigurationLocationUri: smithy_client_1.expectString,
1375
- ConfigurationName: smithy_client_1.expectString,
1376
- ConfigurationProfileId: smithy_client_1.expectString,
1377
- ConfigurationVersion: smithy_client_1.expectString,
1378
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
1379
- DeploymentNumber: smithy_client_1.expectInt32,
1380
- DeploymentStrategyId: smithy_client_1.expectString,
1381
- Description: smithy_client_1.expectString,
1382
- EnvironmentId: smithy_client_1.expectString,
1383
- EventLog: (_) => de_DeploymentEvents(_, context),
1384
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
1385
- GrowthFactor: smithy_client_1.limitedParseFloat32,
1386
- GrowthType: smithy_client_1.expectString,
1387
- KmsKeyArn: smithy_client_1.expectString,
1388
- KmsKeyIdentifier: smithy_client_1.expectString,
1389
- PercentageComplete: smithy_client_1.limitedParseFloat32,
1390
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1391
- State: smithy_client_1.expectString,
1392
- VersionLabel: smithy_client_1.expectString,
1393
- });
1394
- Object.assign(contents, doc);
1395
- return contents;
1396
- };
1397
- exports.de_GetDeploymentCommand = de_GetDeploymentCommand;
1398
- const de_GetDeploymentCommandError = async (output, context) => {
1399
- const parsedOutput = {
1400
- ...output,
1401
- body: await parseErrorBody(output.body, context),
1402
- };
1403
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1404
- switch (errorCode) {
1405
- case "BadRequestException":
1406
- case "com.amazonaws.appconfig#BadRequestException":
1407
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1408
- case "InternalServerException":
1409
- case "com.amazonaws.appconfig#InternalServerException":
1410
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1411
- case "ResourceNotFoundException":
1412
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1413
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1414
- default:
1415
- const parsedBody = parsedOutput.body;
1416
- return throwDefaultError({
1417
- output,
1418
- parsedBody,
1419
- errorCode,
1420
- });
1421
- }
1422
- };
1423
- const de_GetDeploymentStrategyCommand = async (output, context) => {
1424
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1425
- return de_GetDeploymentStrategyCommandError(output, context);
1426
- }
1427
- const contents = (0, smithy_client_1.map)({
1428
- $metadata: deserializeMetadata(output),
1429
- });
1430
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1431
- const doc = (0, smithy_client_1.take)(data, {
1432
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
1433
- Description: smithy_client_1.expectString,
1434
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
1435
- GrowthFactor: smithy_client_1.limitedParseFloat32,
1436
- GrowthType: smithy_client_1.expectString,
1437
- Id: smithy_client_1.expectString,
1438
- Name: smithy_client_1.expectString,
1439
- ReplicateTo: smithy_client_1.expectString,
1440
- });
1441
- Object.assign(contents, doc);
1442
- return contents;
1443
- };
1444
- exports.de_GetDeploymentStrategyCommand = de_GetDeploymentStrategyCommand;
1445
- const de_GetDeploymentStrategyCommandError = async (output, context) => {
1446
- const parsedOutput = {
1447
- ...output,
1448
- body: await parseErrorBody(output.body, context),
1449
- };
1450
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1451
- switch (errorCode) {
1452
- case "BadRequestException":
1453
- case "com.amazonaws.appconfig#BadRequestException":
1454
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1455
- case "InternalServerException":
1456
- case "com.amazonaws.appconfig#InternalServerException":
1457
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1458
- case "ResourceNotFoundException":
1459
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1460
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1461
- default:
1462
- const parsedBody = parsedOutput.body;
1463
- return throwDefaultError({
1464
- output,
1465
- parsedBody,
1466
- errorCode,
1467
- });
1468
- }
1469
- };
1470
- const de_GetEnvironmentCommand = async (output, context) => {
1471
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1472
- return de_GetEnvironmentCommandError(output, context);
1473
- }
1474
- const contents = (0, smithy_client_1.map)({
1475
- $metadata: deserializeMetadata(output),
1476
- });
1477
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1478
- const doc = (0, smithy_client_1.take)(data, {
1479
- ApplicationId: smithy_client_1.expectString,
1480
- Description: smithy_client_1.expectString,
1481
- Id: smithy_client_1.expectString,
1482
- Monitors: smithy_client_1._json,
1483
- Name: smithy_client_1.expectString,
1484
- State: smithy_client_1.expectString,
1485
- });
1486
- Object.assign(contents, doc);
1487
- return contents;
1488
- };
1489
- exports.de_GetEnvironmentCommand = de_GetEnvironmentCommand;
1490
- const de_GetEnvironmentCommandError = async (output, context) => {
1491
- const parsedOutput = {
1492
- ...output,
1493
- body: await parseErrorBody(output.body, context),
1494
- };
1495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1496
- switch (errorCode) {
1497
- case "BadRequestException":
1498
- case "com.amazonaws.appconfig#BadRequestException":
1499
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1500
- case "InternalServerException":
1501
- case "com.amazonaws.appconfig#InternalServerException":
1502
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1503
- case "ResourceNotFoundException":
1504
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1505
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1506
- default:
1507
- const parsedBody = parsedOutput.body;
1508
- return throwDefaultError({
1509
- output,
1510
- parsedBody,
1511
- errorCode,
1512
- });
1513
- }
1514
- };
1515
- const de_GetExtensionCommand = async (output, context) => {
1516
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1517
- return de_GetExtensionCommandError(output, context);
1518
- }
1519
- const contents = (0, smithy_client_1.map)({
1520
- $metadata: deserializeMetadata(output),
1521
- });
1522
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1523
- const doc = (0, smithy_client_1.take)(data, {
1524
- Actions: smithy_client_1._json,
1525
- Arn: smithy_client_1.expectString,
1526
- Description: smithy_client_1.expectString,
1527
- Id: smithy_client_1.expectString,
1528
- Name: smithy_client_1.expectString,
1529
- Parameters: smithy_client_1._json,
1530
- VersionNumber: smithy_client_1.expectInt32,
1531
- });
1532
- Object.assign(contents, doc);
1533
- return contents;
1534
- };
1535
- exports.de_GetExtensionCommand = de_GetExtensionCommand;
1536
- const de_GetExtensionCommandError = async (output, context) => {
1537
- const parsedOutput = {
1538
- ...output,
1539
- body: await parseErrorBody(output.body, context),
1540
- };
1541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1542
- switch (errorCode) {
1543
- case "BadRequestException":
1544
- case "com.amazonaws.appconfig#BadRequestException":
1545
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1546
- case "InternalServerException":
1547
- case "com.amazonaws.appconfig#InternalServerException":
1548
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1549
- case "ResourceNotFoundException":
1550
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1551
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1552
- default:
1553
- const parsedBody = parsedOutput.body;
1554
- return throwDefaultError({
1555
- output,
1556
- parsedBody,
1557
- errorCode,
1558
- });
1559
- }
1560
- };
1561
- const de_GetExtensionAssociationCommand = async (output, context) => {
1562
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1563
- return de_GetExtensionAssociationCommandError(output, context);
1564
- }
1565
- const contents = (0, smithy_client_1.map)({
1566
- $metadata: deserializeMetadata(output),
1567
- });
1568
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1569
- const doc = (0, smithy_client_1.take)(data, {
1570
- Arn: smithy_client_1.expectString,
1571
- ExtensionArn: smithy_client_1.expectString,
1572
- ExtensionVersionNumber: smithy_client_1.expectInt32,
1573
- Id: smithy_client_1.expectString,
1574
- Parameters: smithy_client_1._json,
1575
- ResourceArn: smithy_client_1.expectString,
1576
- });
1577
- Object.assign(contents, doc);
1578
- return contents;
1579
- };
1580
- exports.de_GetExtensionAssociationCommand = de_GetExtensionAssociationCommand;
1581
- const de_GetExtensionAssociationCommandError = async (output, context) => {
1582
- const parsedOutput = {
1583
- ...output,
1584
- body: await parseErrorBody(output.body, context),
1585
- };
1586
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1587
- switch (errorCode) {
1588
- case "BadRequestException":
1589
- case "com.amazonaws.appconfig#BadRequestException":
1590
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1591
- case "InternalServerException":
1592
- case "com.amazonaws.appconfig#InternalServerException":
1593
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1594
- case "ResourceNotFoundException":
1595
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1596
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1597
- default:
1598
- const parsedBody = parsedOutput.body;
1599
- return throwDefaultError({
1600
- output,
1601
- parsedBody,
1602
- errorCode,
1603
- });
1604
- }
1605
- };
1606
- const de_GetHostedConfigurationVersionCommand = async (output, context) => {
1607
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1608
- return de_GetHostedConfigurationVersionCommandError(output, context);
1609
- }
1610
- const contents = (0, smithy_client_1.map)({
1611
- $metadata: deserializeMetadata(output),
1612
- [_AI]: [, output.headers[_ai]],
1613
- [_CPI]: [, output.headers[_cpi]],
1614
- [_VN]: [() => void 0 !== output.headers[_vn_], () => (0, smithy_client_1.strictParseInt32)(output.headers[_vn_])],
1615
- [_D]: [, output.headers[_d]],
1616
- [_CT]: [, output.headers[_ct]],
1617
- [_VL]: [, output.headers[_v]],
1618
- [_KKA]: [, output.headers[_k]],
1619
- });
1620
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
1621
- contents.Content = data;
1622
- return contents;
1623
- };
1624
- exports.de_GetHostedConfigurationVersionCommand = de_GetHostedConfigurationVersionCommand;
1625
- const de_GetHostedConfigurationVersionCommandError = async (output, context) => {
1626
- const parsedOutput = {
1627
- ...output,
1628
- body: await parseErrorBody(output.body, context),
1629
- };
1630
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1631
- switch (errorCode) {
1632
- case "BadRequestException":
1633
- case "com.amazonaws.appconfig#BadRequestException":
1634
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1635
- case "InternalServerException":
1636
- case "com.amazonaws.appconfig#InternalServerException":
1637
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1638
- case "ResourceNotFoundException":
1639
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1640
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1641
- default:
1642
- const parsedBody = parsedOutput.body;
1643
- return throwDefaultError({
1644
- output,
1645
- parsedBody,
1646
- errorCode,
1647
- });
1648
- }
1649
- };
1650
- const de_ListApplicationsCommand = async (output, context) => {
1651
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1652
- return de_ListApplicationsCommandError(output, context);
1653
- }
1654
- const contents = (0, smithy_client_1.map)({
1655
- $metadata: deserializeMetadata(output),
1656
- });
1657
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1658
- const doc = (0, smithy_client_1.take)(data, {
1659
- Items: smithy_client_1._json,
1660
- NextToken: smithy_client_1.expectString,
1661
- });
1662
- Object.assign(contents, doc);
1663
- return contents;
1664
- };
1665
- exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
1666
- const de_ListApplicationsCommandError = async (output, context) => {
1667
- const parsedOutput = {
1668
- ...output,
1669
- body: await parseErrorBody(output.body, context),
1670
- };
1671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1672
- switch (errorCode) {
1673
- case "BadRequestException":
1674
- case "com.amazonaws.appconfig#BadRequestException":
1675
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1676
- case "InternalServerException":
1677
- case "com.amazonaws.appconfig#InternalServerException":
1678
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1679
- default:
1680
- const parsedBody = parsedOutput.body;
1681
- return throwDefaultError({
1682
- output,
1683
- parsedBody,
1684
- errorCode,
1685
- });
1686
- }
1687
- };
1688
- const de_ListConfigurationProfilesCommand = async (output, context) => {
1689
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1690
- return de_ListConfigurationProfilesCommandError(output, context);
1691
- }
1692
- const contents = (0, smithy_client_1.map)({
1693
- $metadata: deserializeMetadata(output),
1694
- });
1695
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1696
- const doc = (0, smithy_client_1.take)(data, {
1697
- Items: smithy_client_1._json,
1698
- NextToken: smithy_client_1.expectString,
1699
- });
1700
- Object.assign(contents, doc);
1701
- return contents;
1702
- };
1703
- exports.de_ListConfigurationProfilesCommand = de_ListConfigurationProfilesCommand;
1704
- const de_ListConfigurationProfilesCommandError = async (output, context) => {
1705
- const parsedOutput = {
1706
- ...output,
1707
- body: await parseErrorBody(output.body, context),
1708
- };
1709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1710
- switch (errorCode) {
1711
- case "BadRequestException":
1712
- case "com.amazonaws.appconfig#BadRequestException":
1713
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1714
- case "InternalServerException":
1715
- case "com.amazonaws.appconfig#InternalServerException":
1716
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1717
- case "ResourceNotFoundException":
1718
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1719
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1720
- default:
1721
- const parsedBody = parsedOutput.body;
1722
- return throwDefaultError({
1723
- output,
1724
- parsedBody,
1725
- errorCode,
1726
- });
1727
- }
1728
- };
1729
- const de_ListDeploymentsCommand = async (output, context) => {
1730
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1731
- return de_ListDeploymentsCommandError(output, context);
1732
- }
1733
- const contents = (0, smithy_client_1.map)({
1734
- $metadata: deserializeMetadata(output),
1735
- });
1736
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1737
- const doc = (0, smithy_client_1.take)(data, {
1738
- Items: (_) => de_DeploymentList(_, context),
1739
- NextToken: smithy_client_1.expectString,
1740
- });
1741
- Object.assign(contents, doc);
1742
- return contents;
1743
- };
1744
- exports.de_ListDeploymentsCommand = de_ListDeploymentsCommand;
1745
- const de_ListDeploymentsCommandError = async (output, context) => {
1746
- const parsedOutput = {
1747
- ...output,
1748
- body: await parseErrorBody(output.body, context),
1749
- };
1750
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1751
- switch (errorCode) {
1752
- case "BadRequestException":
1753
- case "com.amazonaws.appconfig#BadRequestException":
1754
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1755
- case "InternalServerException":
1756
- case "com.amazonaws.appconfig#InternalServerException":
1757
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1758
- case "ResourceNotFoundException":
1759
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1760
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1761
- default:
1762
- const parsedBody = parsedOutput.body;
1763
- return throwDefaultError({
1764
- output,
1765
- parsedBody,
1766
- errorCode,
1767
- });
1768
- }
1769
- };
1770
- const de_ListDeploymentStrategiesCommand = async (output, context) => {
1771
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1772
- return de_ListDeploymentStrategiesCommandError(output, context);
1773
- }
1774
- const contents = (0, smithy_client_1.map)({
1775
- $metadata: deserializeMetadata(output),
1776
- });
1777
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1778
- const doc = (0, smithy_client_1.take)(data, {
1779
- Items: (_) => de_DeploymentStrategyList(_, context),
1780
- NextToken: smithy_client_1.expectString,
1781
- });
1782
- Object.assign(contents, doc);
1783
- return contents;
1784
- };
1785
- exports.de_ListDeploymentStrategiesCommand = de_ListDeploymentStrategiesCommand;
1786
- const de_ListDeploymentStrategiesCommandError = async (output, context) => {
1787
- const parsedOutput = {
1788
- ...output,
1789
- body: await parseErrorBody(output.body, context),
1790
- };
1791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1792
- switch (errorCode) {
1793
- case "BadRequestException":
1794
- case "com.amazonaws.appconfig#BadRequestException":
1795
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1796
- case "InternalServerException":
1797
- case "com.amazonaws.appconfig#InternalServerException":
1798
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1799
- default:
1800
- const parsedBody = parsedOutput.body;
1801
- return throwDefaultError({
1802
- output,
1803
- parsedBody,
1804
- errorCode,
1805
- });
1806
- }
1807
- };
1808
- const de_ListEnvironmentsCommand = async (output, context) => {
1809
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1810
- return de_ListEnvironmentsCommandError(output, context);
1811
- }
1812
- const contents = (0, smithy_client_1.map)({
1813
- $metadata: deserializeMetadata(output),
1814
- });
1815
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1816
- const doc = (0, smithy_client_1.take)(data, {
1817
- Items: smithy_client_1._json,
1818
- NextToken: smithy_client_1.expectString,
1819
- });
1820
- Object.assign(contents, doc);
1821
- return contents;
1822
- };
1823
- exports.de_ListEnvironmentsCommand = de_ListEnvironmentsCommand;
1824
- const de_ListEnvironmentsCommandError = async (output, context) => {
1825
- const parsedOutput = {
1826
- ...output,
1827
- body: await parseErrorBody(output.body, context),
1828
- };
1829
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1830
- switch (errorCode) {
1831
- case "BadRequestException":
1832
- case "com.amazonaws.appconfig#BadRequestException":
1833
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1834
- case "InternalServerException":
1835
- case "com.amazonaws.appconfig#InternalServerException":
1836
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1837
- case "ResourceNotFoundException":
1838
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1839
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1840
- default:
1841
- const parsedBody = parsedOutput.body;
1842
- return throwDefaultError({
1843
- output,
1844
- parsedBody,
1845
- errorCode,
1846
- });
1847
- }
1848
- };
1849
- const de_ListExtensionAssociationsCommand = async (output, context) => {
1850
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1851
- return de_ListExtensionAssociationsCommandError(output, context);
1852
- }
1853
- const contents = (0, smithy_client_1.map)({
1854
- $metadata: deserializeMetadata(output),
1855
- });
1856
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1857
- const doc = (0, smithy_client_1.take)(data, {
1858
- Items: smithy_client_1._json,
1859
- NextToken: smithy_client_1.expectString,
1860
- });
1861
- Object.assign(contents, doc);
1862
- return contents;
1863
- };
1864
- exports.de_ListExtensionAssociationsCommand = de_ListExtensionAssociationsCommand;
1865
- const de_ListExtensionAssociationsCommandError = async (output, context) => {
1866
- const parsedOutput = {
1867
- ...output,
1868
- body: await parseErrorBody(output.body, context),
1869
- };
1870
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1871
- switch (errorCode) {
1872
- case "BadRequestException":
1873
- case "com.amazonaws.appconfig#BadRequestException":
1874
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1875
- case "InternalServerException":
1876
- case "com.amazonaws.appconfig#InternalServerException":
1877
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1878
- default:
1879
- const parsedBody = parsedOutput.body;
1880
- return throwDefaultError({
1881
- output,
1882
- parsedBody,
1883
- errorCode,
1884
- });
1885
- }
1886
- };
1887
- const de_ListExtensionsCommand = async (output, context) => {
1888
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1889
- return de_ListExtensionsCommandError(output, context);
1890
- }
1891
- const contents = (0, smithy_client_1.map)({
1892
- $metadata: deserializeMetadata(output),
1893
- });
1894
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1895
- const doc = (0, smithy_client_1.take)(data, {
1896
- Items: smithy_client_1._json,
1897
- NextToken: smithy_client_1.expectString,
1898
- });
1899
- Object.assign(contents, doc);
1900
- return contents;
1901
- };
1902
- exports.de_ListExtensionsCommand = de_ListExtensionsCommand;
1903
- const de_ListExtensionsCommandError = async (output, context) => {
1904
- const parsedOutput = {
1905
- ...output,
1906
- body: await parseErrorBody(output.body, context),
1907
- };
1908
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1909
- switch (errorCode) {
1910
- case "BadRequestException":
1911
- case "com.amazonaws.appconfig#BadRequestException":
1912
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1913
- case "InternalServerException":
1914
- case "com.amazonaws.appconfig#InternalServerException":
1915
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1916
- default:
1917
- const parsedBody = parsedOutput.body;
1918
- return throwDefaultError({
1919
- output,
1920
- parsedBody,
1921
- errorCode,
1922
- });
1923
- }
1924
- };
1925
- const de_ListHostedConfigurationVersionsCommand = async (output, context) => {
1926
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1927
- return de_ListHostedConfigurationVersionsCommandError(output, context);
1928
- }
1929
- const contents = (0, smithy_client_1.map)({
1930
- $metadata: deserializeMetadata(output),
1931
- });
1932
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1933
- const doc = (0, smithy_client_1.take)(data, {
1934
- Items: smithy_client_1._json,
1935
- NextToken: smithy_client_1.expectString,
1936
- });
1937
- Object.assign(contents, doc);
1938
- return contents;
1939
- };
1940
- exports.de_ListHostedConfigurationVersionsCommand = de_ListHostedConfigurationVersionsCommand;
1941
- const de_ListHostedConfigurationVersionsCommandError = async (output, context) => {
1942
- const parsedOutput = {
1943
- ...output,
1944
- body: await parseErrorBody(output.body, context),
1945
- };
1946
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1947
- switch (errorCode) {
1948
- case "BadRequestException":
1949
- case "com.amazonaws.appconfig#BadRequestException":
1950
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1951
- case "InternalServerException":
1952
- case "com.amazonaws.appconfig#InternalServerException":
1953
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1954
- case "ResourceNotFoundException":
1955
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1956
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1957
- default:
1958
- const parsedBody = parsedOutput.body;
1959
- return throwDefaultError({
1960
- output,
1961
- parsedBody,
1962
- errorCode,
1963
- });
1964
- }
1965
- };
1966
- const de_ListTagsForResourceCommand = async (output, context) => {
1967
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1968
- return de_ListTagsForResourceCommandError(output, context);
1969
- }
1970
- const contents = (0, smithy_client_1.map)({
1971
- $metadata: deserializeMetadata(output),
1972
- });
1973
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1974
- const doc = (0, smithy_client_1.take)(data, {
1975
- Tags: smithy_client_1._json,
1976
- });
1977
- Object.assign(contents, doc);
1978
- return contents;
1979
- };
1980
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1981
- const de_ListTagsForResourceCommandError = async (output, context) => {
1982
- const parsedOutput = {
1983
- ...output,
1984
- body: await parseErrorBody(output.body, context),
1985
- };
1986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1987
- switch (errorCode) {
1988
- case "BadRequestException":
1989
- case "com.amazonaws.appconfig#BadRequestException":
1990
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1991
- case "InternalServerException":
1992
- case "com.amazonaws.appconfig#InternalServerException":
1993
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1994
- case "ResourceNotFoundException":
1995
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1996
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1997
- default:
1998
- const parsedBody = parsedOutput.body;
1999
- return throwDefaultError({
2000
- output,
2001
- parsedBody,
2002
- errorCode,
2003
- });
2004
- }
2005
- };
2006
- const de_StartDeploymentCommand = async (output, context) => {
2007
- if (output.statusCode !== 201 && output.statusCode >= 300) {
2008
- return de_StartDeploymentCommandError(output, context);
2009
- }
2010
- const contents = (0, smithy_client_1.map)({
2011
- $metadata: deserializeMetadata(output),
2012
- });
2013
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2014
- const doc = (0, smithy_client_1.take)(data, {
2015
- ApplicationId: smithy_client_1.expectString,
2016
- AppliedExtensions: smithy_client_1._json,
2017
- CompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2018
- ConfigurationLocationUri: smithy_client_1.expectString,
2019
- ConfigurationName: smithy_client_1.expectString,
2020
- ConfigurationProfileId: smithy_client_1.expectString,
2021
- ConfigurationVersion: smithy_client_1.expectString,
2022
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
2023
- DeploymentNumber: smithy_client_1.expectInt32,
2024
- DeploymentStrategyId: smithy_client_1.expectString,
2025
- Description: smithy_client_1.expectString,
2026
- EnvironmentId: smithy_client_1.expectString,
2027
- EventLog: (_) => de_DeploymentEvents(_, context),
2028
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
2029
- GrowthFactor: smithy_client_1.limitedParseFloat32,
2030
- GrowthType: smithy_client_1.expectString,
2031
- KmsKeyArn: smithy_client_1.expectString,
2032
- KmsKeyIdentifier: smithy_client_1.expectString,
2033
- PercentageComplete: smithy_client_1.limitedParseFloat32,
2034
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2035
- State: smithy_client_1.expectString,
2036
- VersionLabel: smithy_client_1.expectString,
2037
- });
2038
- Object.assign(contents, doc);
2039
- return contents;
2040
- };
2041
- exports.de_StartDeploymentCommand = de_StartDeploymentCommand;
2042
- const de_StartDeploymentCommandError = async (output, context) => {
2043
- const parsedOutput = {
2044
- ...output,
2045
- body: await parseErrorBody(output.body, context),
2046
- };
2047
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2048
- switch (errorCode) {
2049
- case "BadRequestException":
2050
- case "com.amazonaws.appconfig#BadRequestException":
2051
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2052
- case "ConflictException":
2053
- case "com.amazonaws.appconfig#ConflictException":
2054
- throw await de_ConflictExceptionRes(parsedOutput, context);
2055
- case "InternalServerException":
2056
- case "com.amazonaws.appconfig#InternalServerException":
2057
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2058
- case "ResourceNotFoundException":
2059
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2060
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2061
- default:
2062
- const parsedBody = parsedOutput.body;
2063
- return throwDefaultError({
2064
- output,
2065
- parsedBody,
2066
- errorCode,
2067
- });
2068
- }
2069
- };
2070
- const de_StopDeploymentCommand = async (output, context) => {
2071
- if (output.statusCode !== 202 && output.statusCode >= 300) {
2072
- return de_StopDeploymentCommandError(output, context);
2073
- }
2074
- const contents = (0, smithy_client_1.map)({
2075
- $metadata: deserializeMetadata(output),
2076
- });
2077
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2078
- const doc = (0, smithy_client_1.take)(data, {
2079
- ApplicationId: smithy_client_1.expectString,
2080
- AppliedExtensions: smithy_client_1._json,
2081
- CompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2082
- ConfigurationLocationUri: smithy_client_1.expectString,
2083
- ConfigurationName: smithy_client_1.expectString,
2084
- ConfigurationProfileId: smithy_client_1.expectString,
2085
- ConfigurationVersion: smithy_client_1.expectString,
2086
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
2087
- DeploymentNumber: smithy_client_1.expectInt32,
2088
- DeploymentStrategyId: smithy_client_1.expectString,
2089
- Description: smithy_client_1.expectString,
2090
- EnvironmentId: smithy_client_1.expectString,
2091
- EventLog: (_) => de_DeploymentEvents(_, context),
2092
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
2093
- GrowthFactor: smithy_client_1.limitedParseFloat32,
2094
- GrowthType: smithy_client_1.expectString,
2095
- KmsKeyArn: smithy_client_1.expectString,
2096
- KmsKeyIdentifier: smithy_client_1.expectString,
2097
- PercentageComplete: smithy_client_1.limitedParseFloat32,
2098
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2099
- State: smithy_client_1.expectString,
2100
- VersionLabel: smithy_client_1.expectString,
2101
- });
2102
- Object.assign(contents, doc);
2103
- return contents;
2104
- };
2105
- exports.de_StopDeploymentCommand = de_StopDeploymentCommand;
2106
- const de_StopDeploymentCommandError = async (output, context) => {
2107
- const parsedOutput = {
2108
- ...output,
2109
- body: await parseErrorBody(output.body, context),
2110
- };
2111
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2112
- switch (errorCode) {
2113
- case "BadRequestException":
2114
- case "com.amazonaws.appconfig#BadRequestException":
2115
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2116
- case "InternalServerException":
2117
- case "com.amazonaws.appconfig#InternalServerException":
2118
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2119
- case "ResourceNotFoundException":
2120
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2121
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2122
- default:
2123
- const parsedBody = parsedOutput.body;
2124
- return throwDefaultError({
2125
- output,
2126
- parsedBody,
2127
- errorCode,
2128
- });
2129
- }
2130
- };
2131
- const de_TagResourceCommand = async (output, context) => {
2132
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2133
- return de_TagResourceCommandError(output, context);
2134
- }
2135
- const contents = (0, smithy_client_1.map)({
2136
- $metadata: deserializeMetadata(output),
2137
- });
2138
- await (0, smithy_client_1.collectBody)(output.body, context);
2139
- return contents;
2140
- };
2141
- exports.de_TagResourceCommand = de_TagResourceCommand;
2142
- const de_TagResourceCommandError = async (output, context) => {
2143
- const parsedOutput = {
2144
- ...output,
2145
- body: await parseErrorBody(output.body, context),
2146
- };
2147
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2148
- switch (errorCode) {
2149
- case "BadRequestException":
2150
- case "com.amazonaws.appconfig#BadRequestException":
2151
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2152
- case "InternalServerException":
2153
- case "com.amazonaws.appconfig#InternalServerException":
2154
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2155
- case "ResourceNotFoundException":
2156
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2157
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2158
- default:
2159
- const parsedBody = parsedOutput.body;
2160
- return throwDefaultError({
2161
- output,
2162
- parsedBody,
2163
- errorCode,
2164
- });
2165
- }
2166
- };
2167
- const de_UntagResourceCommand = async (output, context) => {
2168
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2169
- return de_UntagResourceCommandError(output, context);
2170
- }
2171
- const contents = (0, smithy_client_1.map)({
2172
- $metadata: deserializeMetadata(output),
2173
- });
2174
- await (0, smithy_client_1.collectBody)(output.body, context);
2175
- return contents;
2176
- };
2177
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2178
- const de_UntagResourceCommandError = async (output, context) => {
2179
- const parsedOutput = {
2180
- ...output,
2181
- body: await parseErrorBody(output.body, context),
2182
- };
2183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
- switch (errorCode) {
2185
- case "BadRequestException":
2186
- case "com.amazonaws.appconfig#BadRequestException":
2187
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2188
- case "InternalServerException":
2189
- case "com.amazonaws.appconfig#InternalServerException":
2190
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2191
- case "ResourceNotFoundException":
2192
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2193
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2194
- default:
2195
- const parsedBody = parsedOutput.body;
2196
- return throwDefaultError({
2197
- output,
2198
- parsedBody,
2199
- errorCode,
2200
- });
2201
- }
2202
- };
2203
- const de_UpdateApplicationCommand = async (output, context) => {
2204
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2205
- return de_UpdateApplicationCommandError(output, context);
2206
- }
2207
- const contents = (0, smithy_client_1.map)({
2208
- $metadata: deserializeMetadata(output),
2209
- });
2210
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2211
- const doc = (0, smithy_client_1.take)(data, {
2212
- Description: smithy_client_1.expectString,
2213
- Id: smithy_client_1.expectString,
2214
- Name: smithy_client_1.expectString,
2215
- });
2216
- Object.assign(contents, doc);
2217
- return contents;
2218
- };
2219
- exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
2220
- const de_UpdateApplicationCommandError = async (output, context) => {
2221
- const parsedOutput = {
2222
- ...output,
2223
- body: await parseErrorBody(output.body, context),
2224
- };
2225
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2226
- switch (errorCode) {
2227
- case "BadRequestException":
2228
- case "com.amazonaws.appconfig#BadRequestException":
2229
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2230
- case "InternalServerException":
2231
- case "com.amazonaws.appconfig#InternalServerException":
2232
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2233
- case "ResourceNotFoundException":
2234
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2235
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2236
- default:
2237
- const parsedBody = parsedOutput.body;
2238
- return throwDefaultError({
2239
- output,
2240
- parsedBody,
2241
- errorCode,
2242
- });
2243
- }
2244
- };
2245
- const de_UpdateConfigurationProfileCommand = async (output, context) => {
2246
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2247
- return de_UpdateConfigurationProfileCommandError(output, context);
2248
- }
2249
- const contents = (0, smithy_client_1.map)({
2250
- $metadata: deserializeMetadata(output),
2251
- });
2252
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2253
- const doc = (0, smithy_client_1.take)(data, {
2254
- ApplicationId: smithy_client_1.expectString,
2255
- Description: smithy_client_1.expectString,
2256
- Id: smithy_client_1.expectString,
2257
- KmsKeyArn: smithy_client_1.expectString,
2258
- KmsKeyIdentifier: smithy_client_1.expectString,
2259
- LocationUri: smithy_client_1.expectString,
2260
- Name: smithy_client_1.expectString,
2261
- RetrievalRoleArn: smithy_client_1.expectString,
2262
- Type: smithy_client_1.expectString,
2263
- Validators: smithy_client_1._json,
2264
- });
2265
- Object.assign(contents, doc);
2266
- return contents;
2267
- };
2268
- exports.de_UpdateConfigurationProfileCommand = de_UpdateConfigurationProfileCommand;
2269
- const de_UpdateConfigurationProfileCommandError = async (output, context) => {
2270
- const parsedOutput = {
2271
- ...output,
2272
- body: await parseErrorBody(output.body, context),
2273
- };
2274
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2275
- switch (errorCode) {
2276
- case "BadRequestException":
2277
- case "com.amazonaws.appconfig#BadRequestException":
2278
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2279
- case "InternalServerException":
2280
- case "com.amazonaws.appconfig#InternalServerException":
2281
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2282
- case "ResourceNotFoundException":
2283
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2284
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2285
- default:
2286
- const parsedBody = parsedOutput.body;
2287
- return throwDefaultError({
2288
- output,
2289
- parsedBody,
2290
- errorCode,
2291
- });
2292
- }
2293
- };
2294
- const de_UpdateDeploymentStrategyCommand = async (output, context) => {
2295
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2296
- return de_UpdateDeploymentStrategyCommandError(output, context);
2297
- }
2298
- const contents = (0, smithy_client_1.map)({
2299
- $metadata: deserializeMetadata(output),
2300
- });
2301
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2302
- const doc = (0, smithy_client_1.take)(data, {
2303
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
2304
- Description: smithy_client_1.expectString,
2305
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
2306
- GrowthFactor: smithy_client_1.limitedParseFloat32,
2307
- GrowthType: smithy_client_1.expectString,
2308
- Id: smithy_client_1.expectString,
2309
- Name: smithy_client_1.expectString,
2310
- ReplicateTo: smithy_client_1.expectString,
2311
- });
2312
- Object.assign(contents, doc);
2313
- return contents;
2314
- };
2315
- exports.de_UpdateDeploymentStrategyCommand = de_UpdateDeploymentStrategyCommand;
2316
- const de_UpdateDeploymentStrategyCommandError = async (output, context) => {
2317
- const parsedOutput = {
2318
- ...output,
2319
- body: await parseErrorBody(output.body, context),
2320
- };
2321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2322
- switch (errorCode) {
2323
- case "BadRequestException":
2324
- case "com.amazonaws.appconfig#BadRequestException":
2325
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2326
- case "InternalServerException":
2327
- case "com.amazonaws.appconfig#InternalServerException":
2328
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2329
- case "ResourceNotFoundException":
2330
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2331
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2332
- default:
2333
- const parsedBody = parsedOutput.body;
2334
- return throwDefaultError({
2335
- output,
2336
- parsedBody,
2337
- errorCode,
2338
- });
2339
- }
2340
- };
2341
- const de_UpdateEnvironmentCommand = async (output, context) => {
2342
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2343
- return de_UpdateEnvironmentCommandError(output, context);
2344
- }
2345
- const contents = (0, smithy_client_1.map)({
2346
- $metadata: deserializeMetadata(output),
2347
- });
2348
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2349
- const doc = (0, smithy_client_1.take)(data, {
2350
- ApplicationId: smithy_client_1.expectString,
2351
- Description: smithy_client_1.expectString,
2352
- Id: smithy_client_1.expectString,
2353
- Monitors: smithy_client_1._json,
2354
- Name: smithy_client_1.expectString,
2355
- State: smithy_client_1.expectString,
2356
- });
2357
- Object.assign(contents, doc);
2358
- return contents;
2359
- };
2360
- exports.de_UpdateEnvironmentCommand = de_UpdateEnvironmentCommand;
2361
- const de_UpdateEnvironmentCommandError = async (output, context) => {
2362
- const parsedOutput = {
2363
- ...output,
2364
- body: await parseErrorBody(output.body, context),
2365
- };
2366
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2367
- switch (errorCode) {
2368
- case "BadRequestException":
2369
- case "com.amazonaws.appconfig#BadRequestException":
2370
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2371
- case "InternalServerException":
2372
- case "com.amazonaws.appconfig#InternalServerException":
2373
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2374
- case "ResourceNotFoundException":
2375
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2376
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2377
- default:
2378
- const parsedBody = parsedOutput.body;
2379
- return throwDefaultError({
2380
- output,
2381
- parsedBody,
2382
- errorCode,
2383
- });
2384
- }
2385
- };
2386
- const de_UpdateExtensionCommand = async (output, context) => {
2387
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2388
- return de_UpdateExtensionCommandError(output, context);
2389
- }
2390
- const contents = (0, smithy_client_1.map)({
2391
- $metadata: deserializeMetadata(output),
2392
- });
2393
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2394
- const doc = (0, smithy_client_1.take)(data, {
2395
- Actions: smithy_client_1._json,
2396
- Arn: smithy_client_1.expectString,
2397
- Description: smithy_client_1.expectString,
2398
- Id: smithy_client_1.expectString,
2399
- Name: smithy_client_1.expectString,
2400
- Parameters: smithy_client_1._json,
2401
- VersionNumber: smithy_client_1.expectInt32,
2402
- });
2403
- Object.assign(contents, doc);
2404
- return contents;
2405
- };
2406
- exports.de_UpdateExtensionCommand = de_UpdateExtensionCommand;
2407
- const de_UpdateExtensionCommandError = async (output, context) => {
2408
- const parsedOutput = {
2409
- ...output,
2410
- body: await parseErrorBody(output.body, context),
2411
- };
2412
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2413
- switch (errorCode) {
2414
- case "BadRequestException":
2415
- case "com.amazonaws.appconfig#BadRequestException":
2416
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2417
- case "ConflictException":
2418
- case "com.amazonaws.appconfig#ConflictException":
2419
- throw await de_ConflictExceptionRes(parsedOutput, context);
2420
- case "InternalServerException":
2421
- case "com.amazonaws.appconfig#InternalServerException":
2422
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2423
- case "ResourceNotFoundException":
2424
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2426
- default:
2427
- const parsedBody = parsedOutput.body;
2428
- return throwDefaultError({
2429
- output,
2430
- parsedBody,
2431
- errorCode,
2432
- });
2433
- }
2434
- };
2435
- const de_UpdateExtensionAssociationCommand = async (output, context) => {
2436
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2437
- return de_UpdateExtensionAssociationCommandError(output, context);
2438
- }
2439
- const contents = (0, smithy_client_1.map)({
2440
- $metadata: deserializeMetadata(output),
2441
- });
2442
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2443
- const doc = (0, smithy_client_1.take)(data, {
2444
- Arn: smithy_client_1.expectString,
2445
- ExtensionArn: smithy_client_1.expectString,
2446
- ExtensionVersionNumber: smithy_client_1.expectInt32,
2447
- Id: smithy_client_1.expectString,
2448
- Parameters: smithy_client_1._json,
2449
- ResourceArn: smithy_client_1.expectString,
2450
- });
2451
- Object.assign(contents, doc);
2452
- return contents;
2453
- };
2454
- exports.de_UpdateExtensionAssociationCommand = de_UpdateExtensionAssociationCommand;
2455
- const de_UpdateExtensionAssociationCommandError = async (output, context) => {
2456
- const parsedOutput = {
2457
- ...output,
2458
- body: await parseErrorBody(output.body, context),
2459
- };
2460
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2461
- switch (errorCode) {
2462
- case "BadRequestException":
2463
- case "com.amazonaws.appconfig#BadRequestException":
2464
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2465
- case "InternalServerException":
2466
- case "com.amazonaws.appconfig#InternalServerException":
2467
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2468
- case "ResourceNotFoundException":
2469
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2470
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2471
- default:
2472
- const parsedBody = parsedOutput.body;
2473
- return throwDefaultError({
2474
- output,
2475
- parsedBody,
2476
- errorCode,
2477
- });
2478
- }
2479
- };
2480
- const de_ValidateConfigurationCommand = async (output, context) => {
2481
- if (output.statusCode !== 204 && output.statusCode >= 300) {
2482
- return de_ValidateConfigurationCommandError(output, context);
2483
- }
2484
- const contents = (0, smithy_client_1.map)({
2485
- $metadata: deserializeMetadata(output),
2486
- });
2487
- await (0, smithy_client_1.collectBody)(output.body, context);
2488
- return contents;
2489
- };
2490
- exports.de_ValidateConfigurationCommand = de_ValidateConfigurationCommand;
2491
- const de_ValidateConfigurationCommandError = async (output, context) => {
2492
- const parsedOutput = {
2493
- ...output,
2494
- body: await parseErrorBody(output.body, context),
2495
- };
2496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2497
- switch (errorCode) {
2498
- case "BadRequestException":
2499
- case "com.amazonaws.appconfig#BadRequestException":
2500
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2501
- case "InternalServerException":
2502
- case "com.amazonaws.appconfig#InternalServerException":
2503
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2504
- case "ResourceNotFoundException":
2505
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2506
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2507
- default:
2508
- const parsedBody = parsedOutput.body;
2509
- return throwDefaultError({
2510
- output,
2511
- parsedBody,
2512
- errorCode,
2513
- });
2514
- }
2515
- };
2516
- const throwDefaultError = (0, smithy_client_1.withBaseException)(AppConfigServiceException_1.AppConfigServiceException);
2517
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
2518
- const contents = (0, smithy_client_1.map)({});
2519
- const data = parsedOutput.body;
2520
- const doc = (0, smithy_client_1.take)(data, {
2521
- Details: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
2522
- Message: smithy_client_1.expectString,
2523
- Reason: smithy_client_1.expectString,
2524
- });
2525
- Object.assign(contents, doc);
2526
- const exception = new models_0_1.BadRequestException({
2527
- $metadata: deserializeMetadata(parsedOutput),
2528
- ...contents,
2529
- });
2530
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2531
- };
2532
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2533
- const contents = (0, smithy_client_1.map)({});
2534
- const data = parsedOutput.body;
2535
- const doc = (0, smithy_client_1.take)(data, {
2536
- Message: smithy_client_1.expectString,
2537
- });
2538
- Object.assign(contents, doc);
2539
- const exception = new models_0_1.ConflictException({
2540
- $metadata: deserializeMetadata(parsedOutput),
2541
- ...contents,
2542
- });
2543
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2544
- };
2545
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2546
- const contents = (0, smithy_client_1.map)({});
2547
- const data = parsedOutput.body;
2548
- const doc = (0, smithy_client_1.take)(data, {
2549
- Message: smithy_client_1.expectString,
2550
- });
2551
- Object.assign(contents, doc);
2552
- const exception = new models_0_1.InternalServerException({
2553
- $metadata: deserializeMetadata(parsedOutput),
2554
- ...contents,
2555
- });
2556
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2557
- };
2558
- const de_PayloadTooLargeExceptionRes = async (parsedOutput, context) => {
2559
- const contents = (0, smithy_client_1.map)({});
2560
- const data = parsedOutput.body;
2561
- const doc = (0, smithy_client_1.take)(data, {
2562
- Limit: smithy_client_1.limitedParseFloat32,
2563
- Measure: smithy_client_1.expectString,
2564
- Message: smithy_client_1.expectString,
2565
- Size: smithy_client_1.limitedParseFloat32,
2566
- });
2567
- Object.assign(contents, doc);
2568
- const exception = new models_0_1.PayloadTooLargeException({
2569
- $metadata: deserializeMetadata(parsedOutput),
2570
- ...contents,
2571
- });
2572
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2573
- };
2574
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2575
- const contents = (0, smithy_client_1.map)({});
2576
- const data = parsedOutput.body;
2577
- const doc = (0, smithy_client_1.take)(data, {
2578
- Message: smithy_client_1.expectString,
2579
- ResourceName: smithy_client_1.expectString,
2580
- });
2581
- Object.assign(contents, doc);
2582
- const exception = new models_0_1.ResourceNotFoundException({
2583
- $metadata: deserializeMetadata(parsedOutput),
2584
- ...contents,
2585
- });
2586
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2587
- };
2588
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2589
- const contents = (0, smithy_client_1.map)({});
2590
- const data = parsedOutput.body;
2591
- const doc = (0, smithy_client_1.take)(data, {
2592
- Message: smithy_client_1.expectString,
2593
- });
2594
- Object.assign(contents, doc);
2595
- const exception = new models_0_1.ServiceQuotaExceededException({
2596
- $metadata: deserializeMetadata(parsedOutput),
2597
- ...contents,
2598
- });
2599
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2600
- };
2601
- const de_DeploymentEvent = (output, context) => {
2602
- return (0, smithy_client_1.take)(output, {
2603
- ActionInvocations: smithy_client_1._json,
2604
- Description: smithy_client_1.expectString,
2605
- EventType: smithy_client_1.expectString,
2606
- OccurredAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2607
- TriggeredBy: smithy_client_1.expectString,
2608
- });
2609
- };
2610
- const de_DeploymentEvents = (output, context) => {
2611
- const retVal = (output || [])
2612
- .filter((e) => e != null)
2613
- .map((entry) => {
2614
- return de_DeploymentEvent(entry, context);
2615
- });
2616
- return retVal;
2617
- };
2618
- const de_DeploymentList = (output, context) => {
2619
- const retVal = (output || [])
2620
- .filter((e) => e != null)
2621
- .map((entry) => {
2622
- return de_DeploymentSummary(entry, context);
2623
- });
2624
- return retVal;
2625
- };
2626
- const de_DeploymentStrategy = (output, context) => {
2627
- return (0, smithy_client_1.take)(output, {
2628
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
2629
- Description: smithy_client_1.expectString,
2630
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
2631
- GrowthFactor: smithy_client_1.limitedParseFloat32,
2632
- GrowthType: smithy_client_1.expectString,
2633
- Id: smithy_client_1.expectString,
2634
- Name: smithy_client_1.expectString,
2635
- ReplicateTo: smithy_client_1.expectString,
2636
- });
2637
- };
2638
- const de_DeploymentStrategyList = (output, context) => {
2639
- const retVal = (output || [])
2640
- .filter((e) => e != null)
2641
- .map((entry) => {
2642
- return de_DeploymentStrategy(entry, context);
2643
- });
2644
- return retVal;
2645
- };
2646
- const de_DeploymentSummary = (output, context) => {
2647
- return (0, smithy_client_1.take)(output, {
2648
- CompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2649
- ConfigurationName: smithy_client_1.expectString,
2650
- ConfigurationVersion: smithy_client_1.expectString,
2651
- DeploymentDurationInMinutes: smithy_client_1.expectInt32,
2652
- DeploymentNumber: smithy_client_1.expectInt32,
2653
- FinalBakeTimeInMinutes: smithy_client_1.expectInt32,
2654
- GrowthFactor: smithy_client_1.limitedParseFloat32,
2655
- GrowthType: smithy_client_1.expectString,
2656
- PercentageComplete: smithy_client_1.limitedParseFloat32,
2657
- StartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
2658
- State: smithy_client_1.expectString,
2659
- VersionLabel: smithy_client_1.expectString,
2660
- });
2661
- };
2662
- const deserializeMetadata = (output) => ({
2663
- httpStatusCode: output.statusCode,
2664
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2665
- extendedRequestId: output.headers["x-amz-id-2"],
2666
- cfId: output.headers["x-amz-cf-id"],
2667
- });
2668
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2669
- const isSerializableHeaderValue = (value) => value !== undefined &&
2670
- value !== null &&
2671
- value !== "" &&
2672
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2673
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2674
- const _AI = "ApplicationId";
2675
- const _CCV = "ClientConfigurationVersion";
2676
- const _CI = "ClientId";
2677
- const _CPI = "ConfigurationProfileId";
2678
- const _CT = "ContentType";
2679
- const _CV = "ConfigurationVersion";
2680
- const _D = "Description";
2681
- const _EI = "ExtensionIdentifier";
2682
- const _EVN = "ExtensionVersionNumber";
2683
- const _KKA = "KmsKeyArn";
2684
- const _LVN = "LatestVersionNumber";
2685
- const _MR = "MaxResults";
2686
- const _N = "Name";
2687
- const _NT = "NextToken";
2688
- const _RI = "ResourceIdentifier";
2689
- const _T = "Type";
2690
- const _TK = "TagKeys";
2691
- const _VL = "VersionLabel";
2692
- const _VN = "VersionNumber";
2693
- const _ai = "application-id";
2694
- const _ccv = "client_configuration_version";
2695
- const _ci = "client_id";
2696
- const _cpi = "configuration-profile-id";
2697
- const _ct = "content-type";
2698
- const _cv = "configuration_version";
2699
- const _cv_ = "configuration-version";
2700
- const _d = "description";
2701
- const _ei = "extension_identifier";
2702
- const _evn = "extension_version_number";
2703
- const _k = "kmskeyarn";
2704
- const _lvn = "latest-version-number";
2705
- const _mr = "max_results";
2706
- const _n = "name";
2707
- const _nt = "next_token";
2708
- const _ri = "resource_identifier";
2709
- const _t = "type";
2710
- const _tK = "tagKeys";
2711
- const _v = "versionlabel";
2712
- const _ve = "version";
2713
- const _vl = "version_label";
2714
- const _vn = "version_number";
2715
- const _vn_ = "version-number";
2716
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2717
- if (encoded.length) {
2718
- return JSON.parse(encoded);
2719
- }
2720
- return {};
2721
- });
2722
- const parseErrorBody = async (errorBody, context) => {
2723
- const value = await parseBody(errorBody, context);
2724
- value.message = value.message ?? value.Message;
2725
- return value;
2726
- };
2727
- const loadRestJsonErrorCode = (output, data) => {
2728
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2729
- const sanitizeErrorCode = (rawValue) => {
2730
- let cleanValue = rawValue;
2731
- if (typeof cleanValue === "number") {
2732
- cleanValue = cleanValue.toString();
2733
- }
2734
- if (cleanValue.indexOf(",") >= 0) {
2735
- cleanValue = cleanValue.split(",")[0];
2736
- }
2737
- if (cleanValue.indexOf(":") >= 0) {
2738
- cleanValue = cleanValue.split(":")[0];
2739
- }
2740
- if (cleanValue.indexOf("#") >= 0) {
2741
- cleanValue = cleanValue.split("#")[1];
2742
- }
2743
- return cleanValue;
2744
- };
2745
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2746
- if (headerKey !== undefined) {
2747
- return sanitizeErrorCode(output.headers[headerKey]);
2748
- }
2749
- if (data.code !== undefined) {
2750
- return sanitizeErrorCode(data.code);
2751
- }
2752
- if (data["__type"] !== undefined) {
2753
- return sanitizeErrorCode(data["__type"]);
2754
- }
2755
- };
1
+ module.exports = require("../index.js");