@aws-sdk/client-ecs 3.490.0 → 3.496.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 (84) hide show
  1. package/dist-cjs/ECS.js +1 -123
  2. package/dist-cjs/ECSClient.js +1 -43
  3. package/dist-cjs/commands/CreateCapacityProviderCommand.js +1 -28
  4. package/dist-cjs/commands/CreateClusterCommand.js +1 -28
  5. package/dist-cjs/commands/CreateServiceCommand.js +1 -28
  6. package/dist-cjs/commands/CreateTaskSetCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteAccountSettingCommand.js +1 -28
  8. package/dist-cjs/commands/DeleteAttributesCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteCapacityProviderCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteClusterCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteServiceCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteTaskDefinitionsCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteTaskSetCommand.js +1 -28
  14. package/dist-cjs/commands/DeregisterContainerInstanceCommand.js +1 -28
  15. package/dist-cjs/commands/DeregisterTaskDefinitionCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeCapacityProvidersCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeClustersCommand.js +1 -28
  18. package/dist-cjs/commands/DescribeContainerInstancesCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeServicesCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeTaskDefinitionCommand.js +1 -28
  21. package/dist-cjs/commands/DescribeTaskSetsCommand.js +1 -28
  22. package/dist-cjs/commands/DescribeTasksCommand.js +1 -28
  23. package/dist-cjs/commands/DiscoverPollEndpointCommand.js +1 -28
  24. package/dist-cjs/commands/ExecuteCommandCommand.js +1 -29
  25. package/dist-cjs/commands/GetTaskProtectionCommand.js +1 -28
  26. package/dist-cjs/commands/ListAccountSettingsCommand.js +1 -28
  27. package/dist-cjs/commands/ListAttributesCommand.js +1 -28
  28. package/dist-cjs/commands/ListClustersCommand.js +1 -28
  29. package/dist-cjs/commands/ListContainerInstancesCommand.js +1 -28
  30. package/dist-cjs/commands/ListServicesByNamespaceCommand.js +1 -28
  31. package/dist-cjs/commands/ListServicesCommand.js +1 -28
  32. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  33. package/dist-cjs/commands/ListTaskDefinitionFamiliesCommand.js +1 -28
  34. package/dist-cjs/commands/ListTaskDefinitionsCommand.js +1 -28
  35. package/dist-cjs/commands/ListTasksCommand.js +1 -28
  36. package/dist-cjs/commands/PutAccountSettingCommand.js +1 -28
  37. package/dist-cjs/commands/PutAccountSettingDefaultCommand.js +1 -28
  38. package/dist-cjs/commands/PutAttributesCommand.js +1 -28
  39. package/dist-cjs/commands/PutClusterCapacityProvidersCommand.js +1 -28
  40. package/dist-cjs/commands/RegisterContainerInstanceCommand.js +1 -28
  41. package/dist-cjs/commands/RegisterTaskDefinitionCommand.js +1 -28
  42. package/dist-cjs/commands/RunTaskCommand.js +1 -28
  43. package/dist-cjs/commands/StartTaskCommand.js +1 -28
  44. package/dist-cjs/commands/StopTaskCommand.js +1 -28
  45. package/dist-cjs/commands/SubmitAttachmentStateChangesCommand.js +1 -28
  46. package/dist-cjs/commands/SubmitContainerStateChangeCommand.js +1 -28
  47. package/dist-cjs/commands/SubmitTaskStateChangeCommand.js +1 -28
  48. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  49. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  50. package/dist-cjs/commands/UpdateCapacityProviderCommand.js +1 -28
  51. package/dist-cjs/commands/UpdateClusterCommand.js +1 -28
  52. package/dist-cjs/commands/UpdateClusterSettingsCommand.js +1 -28
  53. package/dist-cjs/commands/UpdateContainerAgentCommand.js +1 -28
  54. package/dist-cjs/commands/UpdateContainerInstancesStateCommand.js +1 -28
  55. package/dist-cjs/commands/UpdateServiceCommand.js +1 -28
  56. package/dist-cjs/commands/UpdateServicePrimaryTaskSetCommand.js +1 -28
  57. package/dist-cjs/commands/UpdateTaskProtectionCommand.js +1 -28
  58. package/dist-cjs/commands/UpdateTaskSetCommand.js +1 -28
  59. package/dist-cjs/commands/index.js +1 -59
  60. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  61. package/dist-cjs/extensionConfiguration.js +1 -2
  62. package/dist-cjs/index.js +6156 -12
  63. package/dist-cjs/models/ECSServiceException.js +1 -12
  64. package/dist-cjs/models/index.js +1 -4
  65. package/dist-cjs/models/models_0.js +1 -659
  66. package/dist-cjs/pagination/Interfaces.js +1 -2
  67. package/dist-cjs/pagination/ListAccountSettingsPaginator.js +1 -7
  68. package/dist-cjs/pagination/ListAttributesPaginator.js +1 -7
  69. package/dist-cjs/pagination/ListClustersPaginator.js +1 -7
  70. package/dist-cjs/pagination/ListContainerInstancesPaginator.js +1 -7
  71. package/dist-cjs/pagination/ListServicesByNamespacePaginator.js +1 -7
  72. package/dist-cjs/pagination/ListServicesPaginator.js +1 -7
  73. package/dist-cjs/pagination/ListTaskDefinitionFamiliesPaginator.js +1 -7
  74. package/dist-cjs/pagination/ListTaskDefinitionsPaginator.js +1 -7
  75. package/dist-cjs/pagination/ListTasksPaginator.js +1 -7
  76. package/dist-cjs/pagination/index.js +1 -13
  77. package/dist-cjs/protocols/Aws_json1_1.js +1 -3776
  78. package/dist-cjs/runtimeExtensions.js +1 -22
  79. package/dist-cjs/waiters/index.js +1 -7
  80. package/dist-cjs/waiters/waitForServicesInactive.js +1 -57
  81. package/dist-cjs/waiters/waitForServicesStable.js +1 -84
  82. package/dist-cjs/waiters/waitForTasksRunning.js +1 -74
  83. package/dist-cjs/waiters/waitForTasksStopped.js +1 -44
  84. package/package.json +41 -41
@@ -1,3776 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_UpdateClusterSettingsCommand = exports.se_UpdateClusterCommand = exports.se_UpdateCapacityProviderCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SubmitTaskStateChangeCommand = exports.se_SubmitContainerStateChangeCommand = exports.se_SubmitAttachmentStateChangesCommand = exports.se_StopTaskCommand = exports.se_StartTaskCommand = exports.se_RunTaskCommand = exports.se_RegisterTaskDefinitionCommand = exports.se_RegisterContainerInstanceCommand = exports.se_PutClusterCapacityProvidersCommand = exports.se_PutAttributesCommand = exports.se_PutAccountSettingDefaultCommand = exports.se_PutAccountSettingCommand = exports.se_ListTasksCommand = exports.se_ListTaskDefinitionsCommand = exports.se_ListTaskDefinitionFamiliesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListServicesByNamespaceCommand = exports.se_ListServicesCommand = exports.se_ListContainerInstancesCommand = exports.se_ListClustersCommand = exports.se_ListAttributesCommand = exports.se_ListAccountSettingsCommand = exports.se_GetTaskProtectionCommand = exports.se_ExecuteCommandCommand = exports.se_DiscoverPollEndpointCommand = exports.se_DescribeTaskSetsCommand = exports.se_DescribeTasksCommand = exports.se_DescribeTaskDefinitionCommand = exports.se_DescribeServicesCommand = exports.se_DescribeContainerInstancesCommand = exports.se_DescribeClustersCommand = exports.se_DescribeCapacityProvidersCommand = exports.se_DeregisterTaskDefinitionCommand = exports.se_DeregisterContainerInstanceCommand = exports.se_DeleteTaskSetCommand = exports.se_DeleteTaskDefinitionsCommand = exports.se_DeleteServiceCommand = exports.se_DeleteClusterCommand = exports.se_DeleteCapacityProviderCommand = exports.se_DeleteAttributesCommand = exports.se_DeleteAccountSettingCommand = exports.se_CreateTaskSetCommand = exports.se_CreateServiceCommand = exports.se_CreateClusterCommand = exports.se_CreateCapacityProviderCommand = void 0;
4
- exports.de_SubmitContainerStateChangeCommand = exports.de_SubmitAttachmentStateChangesCommand = exports.de_StopTaskCommand = exports.de_StartTaskCommand = exports.de_RunTaskCommand = exports.de_RegisterTaskDefinitionCommand = exports.de_RegisterContainerInstanceCommand = exports.de_PutClusterCapacityProvidersCommand = exports.de_PutAttributesCommand = exports.de_PutAccountSettingDefaultCommand = exports.de_PutAccountSettingCommand = exports.de_ListTasksCommand = exports.de_ListTaskDefinitionsCommand = exports.de_ListTaskDefinitionFamiliesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListServicesByNamespaceCommand = exports.de_ListServicesCommand = exports.de_ListContainerInstancesCommand = exports.de_ListClustersCommand = exports.de_ListAttributesCommand = exports.de_ListAccountSettingsCommand = exports.de_GetTaskProtectionCommand = exports.de_ExecuteCommandCommand = exports.de_DiscoverPollEndpointCommand = exports.de_DescribeTaskSetsCommand = exports.de_DescribeTasksCommand = exports.de_DescribeTaskDefinitionCommand = exports.de_DescribeServicesCommand = exports.de_DescribeContainerInstancesCommand = exports.de_DescribeClustersCommand = exports.de_DescribeCapacityProvidersCommand = exports.de_DeregisterTaskDefinitionCommand = exports.de_DeregisterContainerInstanceCommand = exports.de_DeleteTaskSetCommand = exports.de_DeleteTaskDefinitionsCommand = exports.de_DeleteServiceCommand = exports.de_DeleteClusterCommand = exports.de_DeleteCapacityProviderCommand = exports.de_DeleteAttributesCommand = exports.de_DeleteAccountSettingCommand = exports.de_CreateTaskSetCommand = exports.de_CreateServiceCommand = exports.de_CreateClusterCommand = exports.de_CreateCapacityProviderCommand = exports.se_UpdateTaskSetCommand = exports.se_UpdateTaskProtectionCommand = exports.se_UpdateServicePrimaryTaskSetCommand = exports.se_UpdateServiceCommand = exports.se_UpdateContainerInstancesStateCommand = exports.se_UpdateContainerAgentCommand = void 0;
5
- exports.de_UpdateTaskSetCommand = exports.de_UpdateTaskProtectionCommand = exports.de_UpdateServicePrimaryTaskSetCommand = exports.de_UpdateServiceCommand = exports.de_UpdateContainerInstancesStateCommand = exports.de_UpdateContainerAgentCommand = exports.de_UpdateClusterSettingsCommand = exports.de_UpdateClusterCommand = exports.de_UpdateCapacityProviderCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SubmitTaskStateChangeCommand = void 0;
6
- const protocol_http_1 = require("@smithy/protocol-http");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const ECSServiceException_1 = require("../models/ECSServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_CreateCapacityProviderCommand = async (input, context) => {
12
- const headers = sharedHeaders("CreateCapacityProvider");
13
- let body;
14
- body = JSON.stringify((0, smithy_client_1._json)(input));
15
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
- };
17
- exports.se_CreateCapacityProviderCommand = se_CreateCapacityProviderCommand;
18
- const se_CreateClusterCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreateCluster");
20
- let body;
21
- body = JSON.stringify((0, smithy_client_1._json)(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- exports.se_CreateClusterCommand = se_CreateClusterCommand;
25
- const se_CreateServiceCommand = async (input, context) => {
26
- const headers = sharedHeaders("CreateService");
27
- let body;
28
- body = JSON.stringify((0, smithy_client_1._json)(input));
29
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
- };
31
- exports.se_CreateServiceCommand = se_CreateServiceCommand;
32
- const se_CreateTaskSetCommand = async (input, context) => {
33
- const headers = sharedHeaders("CreateTaskSet");
34
- let body;
35
- body = JSON.stringify(se_CreateTaskSetRequest(input, context));
36
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
- };
38
- exports.se_CreateTaskSetCommand = se_CreateTaskSetCommand;
39
- const se_DeleteAccountSettingCommand = async (input, context) => {
40
- const headers = sharedHeaders("DeleteAccountSetting");
41
- let body;
42
- body = JSON.stringify((0, smithy_client_1._json)(input));
43
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
44
- };
45
- exports.se_DeleteAccountSettingCommand = se_DeleteAccountSettingCommand;
46
- const se_DeleteAttributesCommand = async (input, context) => {
47
- const headers = sharedHeaders("DeleteAttributes");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1._json)(input));
50
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
51
- };
52
- exports.se_DeleteAttributesCommand = se_DeleteAttributesCommand;
53
- const se_DeleteCapacityProviderCommand = async (input, context) => {
54
- const headers = sharedHeaders("DeleteCapacityProvider");
55
- let body;
56
- body = JSON.stringify((0, smithy_client_1._json)(input));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- exports.se_DeleteCapacityProviderCommand = se_DeleteCapacityProviderCommand;
60
- const se_DeleteClusterCommand = async (input, context) => {
61
- const headers = sharedHeaders("DeleteCluster");
62
- let body;
63
- body = JSON.stringify((0, smithy_client_1._json)(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- exports.se_DeleteClusterCommand = se_DeleteClusterCommand;
67
- const se_DeleteServiceCommand = async (input, context) => {
68
- const headers = sharedHeaders("DeleteService");
69
- let body;
70
- body = JSON.stringify((0, smithy_client_1._json)(input));
71
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
- };
73
- exports.se_DeleteServiceCommand = se_DeleteServiceCommand;
74
- const se_DeleteTaskDefinitionsCommand = async (input, context) => {
75
- const headers = sharedHeaders("DeleteTaskDefinitions");
76
- let body;
77
- body = JSON.stringify((0, smithy_client_1._json)(input));
78
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
79
- };
80
- exports.se_DeleteTaskDefinitionsCommand = se_DeleteTaskDefinitionsCommand;
81
- const se_DeleteTaskSetCommand = async (input, context) => {
82
- const headers = sharedHeaders("DeleteTaskSet");
83
- let body;
84
- body = JSON.stringify((0, smithy_client_1._json)(input));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- exports.se_DeleteTaskSetCommand = se_DeleteTaskSetCommand;
88
- const se_DeregisterContainerInstanceCommand = async (input, context) => {
89
- const headers = sharedHeaders("DeregisterContainerInstance");
90
- let body;
91
- body = JSON.stringify((0, smithy_client_1._json)(input));
92
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
- };
94
- exports.se_DeregisterContainerInstanceCommand = se_DeregisterContainerInstanceCommand;
95
- const se_DeregisterTaskDefinitionCommand = async (input, context) => {
96
- const headers = sharedHeaders("DeregisterTaskDefinition");
97
- let body;
98
- body = JSON.stringify((0, smithy_client_1._json)(input));
99
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
- };
101
- exports.se_DeregisterTaskDefinitionCommand = se_DeregisterTaskDefinitionCommand;
102
- const se_DescribeCapacityProvidersCommand = async (input, context) => {
103
- const headers = sharedHeaders("DescribeCapacityProviders");
104
- let body;
105
- body = JSON.stringify((0, smithy_client_1._json)(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- exports.se_DescribeCapacityProvidersCommand = se_DescribeCapacityProvidersCommand;
109
- const se_DescribeClustersCommand = async (input, context) => {
110
- const headers = sharedHeaders("DescribeClusters");
111
- let body;
112
- body = JSON.stringify((0, smithy_client_1._json)(input));
113
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
- };
115
- exports.se_DescribeClustersCommand = se_DescribeClustersCommand;
116
- const se_DescribeContainerInstancesCommand = async (input, context) => {
117
- const headers = sharedHeaders("DescribeContainerInstances");
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1._json)(input));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- exports.se_DescribeContainerInstancesCommand = se_DescribeContainerInstancesCommand;
123
- const se_DescribeServicesCommand = async (input, context) => {
124
- const headers = sharedHeaders("DescribeServices");
125
- let body;
126
- body = JSON.stringify((0, smithy_client_1._json)(input));
127
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
- };
129
- exports.se_DescribeServicesCommand = se_DescribeServicesCommand;
130
- const se_DescribeTaskDefinitionCommand = async (input, context) => {
131
- const headers = sharedHeaders("DescribeTaskDefinition");
132
- let body;
133
- body = JSON.stringify((0, smithy_client_1._json)(input));
134
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
135
- };
136
- exports.se_DescribeTaskDefinitionCommand = se_DescribeTaskDefinitionCommand;
137
- const se_DescribeTasksCommand = async (input, context) => {
138
- const headers = sharedHeaders("DescribeTasks");
139
- let body;
140
- body = JSON.stringify((0, smithy_client_1._json)(input));
141
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
- };
143
- exports.se_DescribeTasksCommand = se_DescribeTasksCommand;
144
- const se_DescribeTaskSetsCommand = async (input, context) => {
145
- const headers = sharedHeaders("DescribeTaskSets");
146
- let body;
147
- body = JSON.stringify((0, smithy_client_1._json)(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- exports.se_DescribeTaskSetsCommand = se_DescribeTaskSetsCommand;
151
- const se_DiscoverPollEndpointCommand = async (input, context) => {
152
- const headers = sharedHeaders("DiscoverPollEndpoint");
153
- let body;
154
- body = JSON.stringify((0, smithy_client_1._json)(input));
155
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
- };
157
- exports.se_DiscoverPollEndpointCommand = se_DiscoverPollEndpointCommand;
158
- const se_ExecuteCommandCommand = async (input, context) => {
159
- const headers = sharedHeaders("ExecuteCommand");
160
- let body;
161
- body = JSON.stringify((0, smithy_client_1._json)(input));
162
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
163
- };
164
- exports.se_ExecuteCommandCommand = se_ExecuteCommandCommand;
165
- const se_GetTaskProtectionCommand = async (input, context) => {
166
- const headers = sharedHeaders("GetTaskProtection");
167
- let body;
168
- body = JSON.stringify((0, smithy_client_1._json)(input));
169
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
170
- };
171
- exports.se_GetTaskProtectionCommand = se_GetTaskProtectionCommand;
172
- const se_ListAccountSettingsCommand = async (input, context) => {
173
- const headers = sharedHeaders("ListAccountSettings");
174
- let body;
175
- body = JSON.stringify((0, smithy_client_1._json)(input));
176
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
- };
178
- exports.se_ListAccountSettingsCommand = se_ListAccountSettingsCommand;
179
- const se_ListAttributesCommand = async (input, context) => {
180
- const headers = sharedHeaders("ListAttributes");
181
- let body;
182
- body = JSON.stringify((0, smithy_client_1._json)(input));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- exports.se_ListAttributesCommand = se_ListAttributesCommand;
186
- const se_ListClustersCommand = async (input, context) => {
187
- const headers = sharedHeaders("ListClusters");
188
- let body;
189
- body = JSON.stringify((0, smithy_client_1._json)(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- exports.se_ListClustersCommand = se_ListClustersCommand;
193
- const se_ListContainerInstancesCommand = async (input, context) => {
194
- const headers = sharedHeaders("ListContainerInstances");
195
- let body;
196
- body = JSON.stringify((0, smithy_client_1._json)(input));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
- exports.se_ListContainerInstancesCommand = se_ListContainerInstancesCommand;
200
- const se_ListServicesCommand = async (input, context) => {
201
- const headers = sharedHeaders("ListServices");
202
- let body;
203
- body = JSON.stringify((0, smithy_client_1._json)(input));
204
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
205
- };
206
- exports.se_ListServicesCommand = se_ListServicesCommand;
207
- const se_ListServicesByNamespaceCommand = async (input, context) => {
208
- const headers = sharedHeaders("ListServicesByNamespace");
209
- let body;
210
- body = JSON.stringify((0, smithy_client_1._json)(input));
211
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
212
- };
213
- exports.se_ListServicesByNamespaceCommand = se_ListServicesByNamespaceCommand;
214
- const se_ListTagsForResourceCommand = async (input, context) => {
215
- const headers = sharedHeaders("ListTagsForResource");
216
- let body;
217
- body = JSON.stringify((0, smithy_client_1._json)(input));
218
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
219
- };
220
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
221
- const se_ListTaskDefinitionFamiliesCommand = async (input, context) => {
222
- const headers = sharedHeaders("ListTaskDefinitionFamilies");
223
- let body;
224
- body = JSON.stringify((0, smithy_client_1._json)(input));
225
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
226
- };
227
- exports.se_ListTaskDefinitionFamiliesCommand = se_ListTaskDefinitionFamiliesCommand;
228
- const se_ListTaskDefinitionsCommand = async (input, context) => {
229
- const headers = sharedHeaders("ListTaskDefinitions");
230
- let body;
231
- body = JSON.stringify((0, smithy_client_1._json)(input));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- exports.se_ListTaskDefinitionsCommand = se_ListTaskDefinitionsCommand;
235
- const se_ListTasksCommand = async (input, context) => {
236
- const headers = sharedHeaders("ListTasks");
237
- let body;
238
- body = JSON.stringify((0, smithy_client_1._json)(input));
239
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
240
- };
241
- exports.se_ListTasksCommand = se_ListTasksCommand;
242
- const se_PutAccountSettingCommand = async (input, context) => {
243
- const headers = sharedHeaders("PutAccountSetting");
244
- let body;
245
- body = JSON.stringify((0, smithy_client_1._json)(input));
246
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
- };
248
- exports.se_PutAccountSettingCommand = se_PutAccountSettingCommand;
249
- const se_PutAccountSettingDefaultCommand = async (input, context) => {
250
- const headers = sharedHeaders("PutAccountSettingDefault");
251
- let body;
252
- body = JSON.stringify((0, smithy_client_1._json)(input));
253
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
254
- };
255
- exports.se_PutAccountSettingDefaultCommand = se_PutAccountSettingDefaultCommand;
256
- const se_PutAttributesCommand = async (input, context) => {
257
- const headers = sharedHeaders("PutAttributes");
258
- let body;
259
- body = JSON.stringify((0, smithy_client_1._json)(input));
260
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
261
- };
262
- exports.se_PutAttributesCommand = se_PutAttributesCommand;
263
- const se_PutClusterCapacityProvidersCommand = async (input, context) => {
264
- const headers = sharedHeaders("PutClusterCapacityProviders");
265
- let body;
266
- body = JSON.stringify((0, smithy_client_1._json)(input));
267
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
268
- };
269
- exports.se_PutClusterCapacityProvidersCommand = se_PutClusterCapacityProvidersCommand;
270
- const se_RegisterContainerInstanceCommand = async (input, context) => {
271
- const headers = sharedHeaders("RegisterContainerInstance");
272
- let body;
273
- body = JSON.stringify(se_RegisterContainerInstanceRequest(input, context));
274
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
- };
276
- exports.se_RegisterContainerInstanceCommand = se_RegisterContainerInstanceCommand;
277
- const se_RegisterTaskDefinitionCommand = async (input, context) => {
278
- const headers = sharedHeaders("RegisterTaskDefinition");
279
- let body;
280
- body = JSON.stringify((0, smithy_client_1._json)(input));
281
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
282
- };
283
- exports.se_RegisterTaskDefinitionCommand = se_RegisterTaskDefinitionCommand;
284
- const se_RunTaskCommand = async (input, context) => {
285
- const headers = sharedHeaders("RunTask");
286
- let body;
287
- body = JSON.stringify(se_RunTaskRequest(input, context));
288
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
289
- };
290
- exports.se_RunTaskCommand = se_RunTaskCommand;
291
- const se_StartTaskCommand = async (input, context) => {
292
- const headers = sharedHeaders("StartTask");
293
- let body;
294
- body = JSON.stringify((0, smithy_client_1._json)(input));
295
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
296
- };
297
- exports.se_StartTaskCommand = se_StartTaskCommand;
298
- const se_StopTaskCommand = async (input, context) => {
299
- const headers = sharedHeaders("StopTask");
300
- let body;
301
- body = JSON.stringify((0, smithy_client_1._json)(input));
302
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
303
- };
304
- exports.se_StopTaskCommand = se_StopTaskCommand;
305
- const se_SubmitAttachmentStateChangesCommand = async (input, context) => {
306
- const headers = sharedHeaders("SubmitAttachmentStateChanges");
307
- let body;
308
- body = JSON.stringify((0, smithy_client_1._json)(input));
309
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
310
- };
311
- exports.se_SubmitAttachmentStateChangesCommand = se_SubmitAttachmentStateChangesCommand;
312
- const se_SubmitContainerStateChangeCommand = async (input, context) => {
313
- const headers = sharedHeaders("SubmitContainerStateChange");
314
- let body;
315
- body = JSON.stringify((0, smithy_client_1._json)(input));
316
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
- };
318
- exports.se_SubmitContainerStateChangeCommand = se_SubmitContainerStateChangeCommand;
319
- const se_SubmitTaskStateChangeCommand = async (input, context) => {
320
- const headers = sharedHeaders("SubmitTaskStateChange");
321
- let body;
322
- body = JSON.stringify(se_SubmitTaskStateChangeRequest(input, context));
323
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
324
- };
325
- exports.se_SubmitTaskStateChangeCommand = se_SubmitTaskStateChangeCommand;
326
- const se_TagResourceCommand = async (input, context) => {
327
- const headers = sharedHeaders("TagResource");
328
- let body;
329
- body = JSON.stringify((0, smithy_client_1._json)(input));
330
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
331
- };
332
- exports.se_TagResourceCommand = se_TagResourceCommand;
333
- const se_UntagResourceCommand = async (input, context) => {
334
- const headers = sharedHeaders("UntagResource");
335
- let body;
336
- body = JSON.stringify((0, smithy_client_1._json)(input));
337
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
338
- };
339
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
340
- const se_UpdateCapacityProviderCommand = async (input, context) => {
341
- const headers = sharedHeaders("UpdateCapacityProvider");
342
- let body;
343
- body = JSON.stringify((0, smithy_client_1._json)(input));
344
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
345
- };
346
- exports.se_UpdateCapacityProviderCommand = se_UpdateCapacityProviderCommand;
347
- const se_UpdateClusterCommand = async (input, context) => {
348
- const headers = sharedHeaders("UpdateCluster");
349
- let body;
350
- body = JSON.stringify((0, smithy_client_1._json)(input));
351
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
352
- };
353
- exports.se_UpdateClusterCommand = se_UpdateClusterCommand;
354
- const se_UpdateClusterSettingsCommand = async (input, context) => {
355
- const headers = sharedHeaders("UpdateClusterSettings");
356
- let body;
357
- body = JSON.stringify((0, smithy_client_1._json)(input));
358
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
359
- };
360
- exports.se_UpdateClusterSettingsCommand = se_UpdateClusterSettingsCommand;
361
- const se_UpdateContainerAgentCommand = async (input, context) => {
362
- const headers = sharedHeaders("UpdateContainerAgent");
363
- let body;
364
- body = JSON.stringify((0, smithy_client_1._json)(input));
365
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
366
- };
367
- exports.se_UpdateContainerAgentCommand = se_UpdateContainerAgentCommand;
368
- const se_UpdateContainerInstancesStateCommand = async (input, context) => {
369
- const headers = sharedHeaders("UpdateContainerInstancesState");
370
- let body;
371
- body = JSON.stringify((0, smithy_client_1._json)(input));
372
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
- };
374
- exports.se_UpdateContainerInstancesStateCommand = se_UpdateContainerInstancesStateCommand;
375
- const se_UpdateServiceCommand = async (input, context) => {
376
- const headers = sharedHeaders("UpdateService");
377
- let body;
378
- body = JSON.stringify((0, smithy_client_1._json)(input));
379
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
380
- };
381
- exports.se_UpdateServiceCommand = se_UpdateServiceCommand;
382
- const se_UpdateServicePrimaryTaskSetCommand = async (input, context) => {
383
- const headers = sharedHeaders("UpdateServicePrimaryTaskSet");
384
- let body;
385
- body = JSON.stringify((0, smithy_client_1._json)(input));
386
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
387
- };
388
- exports.se_UpdateServicePrimaryTaskSetCommand = se_UpdateServicePrimaryTaskSetCommand;
389
- const se_UpdateTaskProtectionCommand = async (input, context) => {
390
- const headers = sharedHeaders("UpdateTaskProtection");
391
- let body;
392
- body = JSON.stringify((0, smithy_client_1._json)(input));
393
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
394
- };
395
- exports.se_UpdateTaskProtectionCommand = se_UpdateTaskProtectionCommand;
396
- const se_UpdateTaskSetCommand = async (input, context) => {
397
- const headers = sharedHeaders("UpdateTaskSet");
398
- let body;
399
- body = JSON.stringify(se_UpdateTaskSetRequest(input, context));
400
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
401
- };
402
- exports.se_UpdateTaskSetCommand = se_UpdateTaskSetCommand;
403
- const de_CreateCapacityProviderCommand = async (output, context) => {
404
- if (output.statusCode >= 300) {
405
- return de_CreateCapacityProviderCommandError(output, context);
406
- }
407
- const data = await parseBody(output.body, context);
408
- let contents = {};
409
- contents = (0, smithy_client_1._json)(data);
410
- const response = {
411
- $metadata: deserializeMetadata(output),
412
- ...contents,
413
- };
414
- return response;
415
- };
416
- exports.de_CreateCapacityProviderCommand = de_CreateCapacityProviderCommand;
417
- const de_CreateCapacityProviderCommandError = async (output, context) => {
418
- const parsedOutput = {
419
- ...output,
420
- body: await parseErrorBody(output.body, context),
421
- };
422
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
423
- switch (errorCode) {
424
- case "ClientException":
425
- case "com.amazonaws.ecs#ClientException":
426
- throw await de_ClientExceptionRes(parsedOutput, context);
427
- case "InvalidParameterException":
428
- case "com.amazonaws.ecs#InvalidParameterException":
429
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
430
- case "LimitExceededException":
431
- case "com.amazonaws.ecs#LimitExceededException":
432
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
433
- case "ServerException":
434
- case "com.amazonaws.ecs#ServerException":
435
- throw await de_ServerExceptionRes(parsedOutput, context);
436
- case "UpdateInProgressException":
437
- case "com.amazonaws.ecs#UpdateInProgressException":
438
- throw await de_UpdateInProgressExceptionRes(parsedOutput, context);
439
- default:
440
- const parsedBody = parsedOutput.body;
441
- return throwDefaultError({
442
- output,
443
- parsedBody,
444
- errorCode,
445
- });
446
- }
447
- };
448
- const de_CreateClusterCommand = async (output, context) => {
449
- if (output.statusCode >= 300) {
450
- return de_CreateClusterCommandError(output, context);
451
- }
452
- const data = await parseBody(output.body, context);
453
- let contents = {};
454
- contents = (0, smithy_client_1._json)(data);
455
- const response = {
456
- $metadata: deserializeMetadata(output),
457
- ...contents,
458
- };
459
- return response;
460
- };
461
- exports.de_CreateClusterCommand = de_CreateClusterCommand;
462
- const de_CreateClusterCommandError = async (output, context) => {
463
- const parsedOutput = {
464
- ...output,
465
- body: await parseErrorBody(output.body, context),
466
- };
467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
468
- switch (errorCode) {
469
- case "ClientException":
470
- case "com.amazonaws.ecs#ClientException":
471
- throw await de_ClientExceptionRes(parsedOutput, context);
472
- case "InvalidParameterException":
473
- case "com.amazonaws.ecs#InvalidParameterException":
474
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
475
- case "NamespaceNotFoundException":
476
- case "com.amazonaws.ecs#NamespaceNotFoundException":
477
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
478
- case "ServerException":
479
- case "com.amazonaws.ecs#ServerException":
480
- throw await de_ServerExceptionRes(parsedOutput, context);
481
- default:
482
- const parsedBody = parsedOutput.body;
483
- return throwDefaultError({
484
- output,
485
- parsedBody,
486
- errorCode,
487
- });
488
- }
489
- };
490
- const de_CreateServiceCommand = async (output, context) => {
491
- if (output.statusCode >= 300) {
492
- return de_CreateServiceCommandError(output, context);
493
- }
494
- const data = await parseBody(output.body, context);
495
- let contents = {};
496
- contents = de_CreateServiceResponse(data, context);
497
- const response = {
498
- $metadata: deserializeMetadata(output),
499
- ...contents,
500
- };
501
- return response;
502
- };
503
- exports.de_CreateServiceCommand = de_CreateServiceCommand;
504
- const de_CreateServiceCommandError = async (output, context) => {
505
- const parsedOutput = {
506
- ...output,
507
- body: await parseErrorBody(output.body, context),
508
- };
509
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
- switch (errorCode) {
511
- case "AccessDeniedException":
512
- case "com.amazonaws.ecs#AccessDeniedException":
513
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
514
- case "ClientException":
515
- case "com.amazonaws.ecs#ClientException":
516
- throw await de_ClientExceptionRes(parsedOutput, context);
517
- case "ClusterNotFoundException":
518
- case "com.amazonaws.ecs#ClusterNotFoundException":
519
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
520
- case "InvalidParameterException":
521
- case "com.amazonaws.ecs#InvalidParameterException":
522
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
523
- case "NamespaceNotFoundException":
524
- case "com.amazonaws.ecs#NamespaceNotFoundException":
525
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
526
- case "PlatformTaskDefinitionIncompatibilityException":
527
- case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException":
528
- throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context);
529
- case "PlatformUnknownException":
530
- case "com.amazonaws.ecs#PlatformUnknownException":
531
- throw await de_PlatformUnknownExceptionRes(parsedOutput, context);
532
- case "ServerException":
533
- case "com.amazonaws.ecs#ServerException":
534
- throw await de_ServerExceptionRes(parsedOutput, context);
535
- case "UnsupportedFeatureException":
536
- case "com.amazonaws.ecs#UnsupportedFeatureException":
537
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
538
- default:
539
- const parsedBody = parsedOutput.body;
540
- return throwDefaultError({
541
- output,
542
- parsedBody,
543
- errorCode,
544
- });
545
- }
546
- };
547
- const de_CreateTaskSetCommand = async (output, context) => {
548
- if (output.statusCode >= 300) {
549
- return de_CreateTaskSetCommandError(output, context);
550
- }
551
- const data = await parseBody(output.body, context);
552
- let contents = {};
553
- contents = de_CreateTaskSetResponse(data, context);
554
- const response = {
555
- $metadata: deserializeMetadata(output),
556
- ...contents,
557
- };
558
- return response;
559
- };
560
- exports.de_CreateTaskSetCommand = de_CreateTaskSetCommand;
561
- const de_CreateTaskSetCommandError = async (output, context) => {
562
- const parsedOutput = {
563
- ...output,
564
- body: await parseErrorBody(output.body, context),
565
- };
566
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
567
- switch (errorCode) {
568
- case "AccessDeniedException":
569
- case "com.amazonaws.ecs#AccessDeniedException":
570
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
571
- case "ClientException":
572
- case "com.amazonaws.ecs#ClientException":
573
- throw await de_ClientExceptionRes(parsedOutput, context);
574
- case "ClusterNotFoundException":
575
- case "com.amazonaws.ecs#ClusterNotFoundException":
576
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
577
- case "InvalidParameterException":
578
- case "com.amazonaws.ecs#InvalidParameterException":
579
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
580
- case "NamespaceNotFoundException":
581
- case "com.amazonaws.ecs#NamespaceNotFoundException":
582
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
583
- case "PlatformTaskDefinitionIncompatibilityException":
584
- case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException":
585
- throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context);
586
- case "PlatformUnknownException":
587
- case "com.amazonaws.ecs#PlatformUnknownException":
588
- throw await de_PlatformUnknownExceptionRes(parsedOutput, context);
589
- case "ServerException":
590
- case "com.amazonaws.ecs#ServerException":
591
- throw await de_ServerExceptionRes(parsedOutput, context);
592
- case "ServiceNotActiveException":
593
- case "com.amazonaws.ecs#ServiceNotActiveException":
594
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
595
- case "ServiceNotFoundException":
596
- case "com.amazonaws.ecs#ServiceNotFoundException":
597
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
598
- case "UnsupportedFeatureException":
599
- case "com.amazonaws.ecs#UnsupportedFeatureException":
600
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
601
- default:
602
- const parsedBody = parsedOutput.body;
603
- return throwDefaultError({
604
- output,
605
- parsedBody,
606
- errorCode,
607
- });
608
- }
609
- };
610
- const de_DeleteAccountSettingCommand = async (output, context) => {
611
- if (output.statusCode >= 300) {
612
- return de_DeleteAccountSettingCommandError(output, context);
613
- }
614
- const data = await parseBody(output.body, context);
615
- let contents = {};
616
- contents = (0, smithy_client_1._json)(data);
617
- const response = {
618
- $metadata: deserializeMetadata(output),
619
- ...contents,
620
- };
621
- return response;
622
- };
623
- exports.de_DeleteAccountSettingCommand = de_DeleteAccountSettingCommand;
624
- const de_DeleteAccountSettingCommandError = async (output, context) => {
625
- const parsedOutput = {
626
- ...output,
627
- body: await parseErrorBody(output.body, context),
628
- };
629
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
630
- switch (errorCode) {
631
- case "ClientException":
632
- case "com.amazonaws.ecs#ClientException":
633
- throw await de_ClientExceptionRes(parsedOutput, context);
634
- case "InvalidParameterException":
635
- case "com.amazonaws.ecs#InvalidParameterException":
636
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
637
- case "ServerException":
638
- case "com.amazonaws.ecs#ServerException":
639
- throw await de_ServerExceptionRes(parsedOutput, context);
640
- default:
641
- const parsedBody = parsedOutput.body;
642
- return throwDefaultError({
643
- output,
644
- parsedBody,
645
- errorCode,
646
- });
647
- }
648
- };
649
- const de_DeleteAttributesCommand = async (output, context) => {
650
- if (output.statusCode >= 300) {
651
- return de_DeleteAttributesCommandError(output, context);
652
- }
653
- const data = await parseBody(output.body, context);
654
- let contents = {};
655
- contents = (0, smithy_client_1._json)(data);
656
- const response = {
657
- $metadata: deserializeMetadata(output),
658
- ...contents,
659
- };
660
- return response;
661
- };
662
- exports.de_DeleteAttributesCommand = de_DeleteAttributesCommand;
663
- const de_DeleteAttributesCommandError = async (output, context) => {
664
- const parsedOutput = {
665
- ...output,
666
- body: await parseErrorBody(output.body, context),
667
- };
668
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
- switch (errorCode) {
670
- case "ClusterNotFoundException":
671
- case "com.amazonaws.ecs#ClusterNotFoundException":
672
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
673
- case "InvalidParameterException":
674
- case "com.amazonaws.ecs#InvalidParameterException":
675
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
676
- case "TargetNotFoundException":
677
- case "com.amazonaws.ecs#TargetNotFoundException":
678
- throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
679
- default:
680
- const parsedBody = parsedOutput.body;
681
- return throwDefaultError({
682
- output,
683
- parsedBody,
684
- errorCode,
685
- });
686
- }
687
- };
688
- const de_DeleteCapacityProviderCommand = async (output, context) => {
689
- if (output.statusCode >= 300) {
690
- return de_DeleteCapacityProviderCommandError(output, context);
691
- }
692
- const data = await parseBody(output.body, context);
693
- let contents = {};
694
- contents = (0, smithy_client_1._json)(data);
695
- const response = {
696
- $metadata: deserializeMetadata(output),
697
- ...contents,
698
- };
699
- return response;
700
- };
701
- exports.de_DeleteCapacityProviderCommand = de_DeleteCapacityProviderCommand;
702
- const de_DeleteCapacityProviderCommandError = async (output, context) => {
703
- const parsedOutput = {
704
- ...output,
705
- body: await parseErrorBody(output.body, context),
706
- };
707
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
- switch (errorCode) {
709
- case "ClientException":
710
- case "com.amazonaws.ecs#ClientException":
711
- throw await de_ClientExceptionRes(parsedOutput, context);
712
- case "InvalidParameterException":
713
- case "com.amazonaws.ecs#InvalidParameterException":
714
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
715
- case "ServerException":
716
- case "com.amazonaws.ecs#ServerException":
717
- throw await de_ServerExceptionRes(parsedOutput, context);
718
- default:
719
- const parsedBody = parsedOutput.body;
720
- return throwDefaultError({
721
- output,
722
- parsedBody,
723
- errorCode,
724
- });
725
- }
726
- };
727
- const de_DeleteClusterCommand = async (output, context) => {
728
- if (output.statusCode >= 300) {
729
- return de_DeleteClusterCommandError(output, context);
730
- }
731
- const data = await parseBody(output.body, context);
732
- let contents = {};
733
- contents = (0, smithy_client_1._json)(data);
734
- const response = {
735
- $metadata: deserializeMetadata(output),
736
- ...contents,
737
- };
738
- return response;
739
- };
740
- exports.de_DeleteClusterCommand = de_DeleteClusterCommand;
741
- const de_DeleteClusterCommandError = async (output, context) => {
742
- const parsedOutput = {
743
- ...output,
744
- body: await parseErrorBody(output.body, context),
745
- };
746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "ClientException":
749
- case "com.amazonaws.ecs#ClientException":
750
- throw await de_ClientExceptionRes(parsedOutput, context);
751
- case "ClusterContainsContainerInstancesException":
752
- case "com.amazonaws.ecs#ClusterContainsContainerInstancesException":
753
- throw await de_ClusterContainsContainerInstancesExceptionRes(parsedOutput, context);
754
- case "ClusterContainsServicesException":
755
- case "com.amazonaws.ecs#ClusterContainsServicesException":
756
- throw await de_ClusterContainsServicesExceptionRes(parsedOutput, context);
757
- case "ClusterContainsTasksException":
758
- case "com.amazonaws.ecs#ClusterContainsTasksException":
759
- throw await de_ClusterContainsTasksExceptionRes(parsedOutput, context);
760
- case "ClusterNotFoundException":
761
- case "com.amazonaws.ecs#ClusterNotFoundException":
762
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
763
- case "InvalidParameterException":
764
- case "com.amazonaws.ecs#InvalidParameterException":
765
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
766
- case "ServerException":
767
- case "com.amazonaws.ecs#ServerException":
768
- throw await de_ServerExceptionRes(parsedOutput, context);
769
- case "UpdateInProgressException":
770
- case "com.amazonaws.ecs#UpdateInProgressException":
771
- throw await de_UpdateInProgressExceptionRes(parsedOutput, context);
772
- default:
773
- const parsedBody = parsedOutput.body;
774
- return throwDefaultError({
775
- output,
776
- parsedBody,
777
- errorCode,
778
- });
779
- }
780
- };
781
- const de_DeleteServiceCommand = async (output, context) => {
782
- if (output.statusCode >= 300) {
783
- return de_DeleteServiceCommandError(output, context);
784
- }
785
- const data = await parseBody(output.body, context);
786
- let contents = {};
787
- contents = de_DeleteServiceResponse(data, context);
788
- const response = {
789
- $metadata: deserializeMetadata(output),
790
- ...contents,
791
- };
792
- return response;
793
- };
794
- exports.de_DeleteServiceCommand = de_DeleteServiceCommand;
795
- const de_DeleteServiceCommandError = async (output, context) => {
796
- const parsedOutput = {
797
- ...output,
798
- body: await parseErrorBody(output.body, context),
799
- };
800
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
- switch (errorCode) {
802
- case "ClientException":
803
- case "com.amazonaws.ecs#ClientException":
804
- throw await de_ClientExceptionRes(parsedOutput, context);
805
- case "ClusterNotFoundException":
806
- case "com.amazonaws.ecs#ClusterNotFoundException":
807
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
808
- case "InvalidParameterException":
809
- case "com.amazonaws.ecs#InvalidParameterException":
810
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
811
- case "ServerException":
812
- case "com.amazonaws.ecs#ServerException":
813
- throw await de_ServerExceptionRes(parsedOutput, context);
814
- case "ServiceNotFoundException":
815
- case "com.amazonaws.ecs#ServiceNotFoundException":
816
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
817
- default:
818
- const parsedBody = parsedOutput.body;
819
- return throwDefaultError({
820
- output,
821
- parsedBody,
822
- errorCode,
823
- });
824
- }
825
- };
826
- const de_DeleteTaskDefinitionsCommand = async (output, context) => {
827
- if (output.statusCode >= 300) {
828
- return de_DeleteTaskDefinitionsCommandError(output, context);
829
- }
830
- const data = await parseBody(output.body, context);
831
- let contents = {};
832
- contents = de_DeleteTaskDefinitionsResponse(data, context);
833
- const response = {
834
- $metadata: deserializeMetadata(output),
835
- ...contents,
836
- };
837
- return response;
838
- };
839
- exports.de_DeleteTaskDefinitionsCommand = de_DeleteTaskDefinitionsCommand;
840
- const de_DeleteTaskDefinitionsCommandError = async (output, context) => {
841
- const parsedOutput = {
842
- ...output,
843
- body: await parseErrorBody(output.body, context),
844
- };
845
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
846
- switch (errorCode) {
847
- case "AccessDeniedException":
848
- case "com.amazonaws.ecs#AccessDeniedException":
849
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
850
- case "ClientException":
851
- case "com.amazonaws.ecs#ClientException":
852
- throw await de_ClientExceptionRes(parsedOutput, context);
853
- case "InvalidParameterException":
854
- case "com.amazonaws.ecs#InvalidParameterException":
855
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
856
- case "ServerException":
857
- case "com.amazonaws.ecs#ServerException":
858
- throw await de_ServerExceptionRes(parsedOutput, context);
859
- default:
860
- const parsedBody = parsedOutput.body;
861
- return throwDefaultError({
862
- output,
863
- parsedBody,
864
- errorCode,
865
- });
866
- }
867
- };
868
- const de_DeleteTaskSetCommand = async (output, context) => {
869
- if (output.statusCode >= 300) {
870
- return de_DeleteTaskSetCommandError(output, context);
871
- }
872
- const data = await parseBody(output.body, context);
873
- let contents = {};
874
- contents = de_DeleteTaskSetResponse(data, context);
875
- const response = {
876
- $metadata: deserializeMetadata(output),
877
- ...contents,
878
- };
879
- return response;
880
- };
881
- exports.de_DeleteTaskSetCommand = de_DeleteTaskSetCommand;
882
- const de_DeleteTaskSetCommandError = async (output, context) => {
883
- const parsedOutput = {
884
- ...output,
885
- body: await parseErrorBody(output.body, context),
886
- };
887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "AccessDeniedException":
890
- case "com.amazonaws.ecs#AccessDeniedException":
891
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
892
- case "ClientException":
893
- case "com.amazonaws.ecs#ClientException":
894
- throw await de_ClientExceptionRes(parsedOutput, context);
895
- case "ClusterNotFoundException":
896
- case "com.amazonaws.ecs#ClusterNotFoundException":
897
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
898
- case "InvalidParameterException":
899
- case "com.amazonaws.ecs#InvalidParameterException":
900
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
901
- case "ServerException":
902
- case "com.amazonaws.ecs#ServerException":
903
- throw await de_ServerExceptionRes(parsedOutput, context);
904
- case "ServiceNotActiveException":
905
- case "com.amazonaws.ecs#ServiceNotActiveException":
906
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
907
- case "ServiceNotFoundException":
908
- case "com.amazonaws.ecs#ServiceNotFoundException":
909
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
910
- case "TaskSetNotFoundException":
911
- case "com.amazonaws.ecs#TaskSetNotFoundException":
912
- throw await de_TaskSetNotFoundExceptionRes(parsedOutput, context);
913
- case "UnsupportedFeatureException":
914
- case "com.amazonaws.ecs#UnsupportedFeatureException":
915
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
916
- default:
917
- const parsedBody = parsedOutput.body;
918
- return throwDefaultError({
919
- output,
920
- parsedBody,
921
- errorCode,
922
- });
923
- }
924
- };
925
- const de_DeregisterContainerInstanceCommand = async (output, context) => {
926
- if (output.statusCode >= 300) {
927
- return de_DeregisterContainerInstanceCommandError(output, context);
928
- }
929
- const data = await parseBody(output.body, context);
930
- let contents = {};
931
- contents = de_DeregisterContainerInstanceResponse(data, context);
932
- const response = {
933
- $metadata: deserializeMetadata(output),
934
- ...contents,
935
- };
936
- return response;
937
- };
938
- exports.de_DeregisterContainerInstanceCommand = de_DeregisterContainerInstanceCommand;
939
- const de_DeregisterContainerInstanceCommandError = async (output, context) => {
940
- const parsedOutput = {
941
- ...output,
942
- body: await parseErrorBody(output.body, context),
943
- };
944
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
- switch (errorCode) {
946
- case "ClientException":
947
- case "com.amazonaws.ecs#ClientException":
948
- throw await de_ClientExceptionRes(parsedOutput, context);
949
- case "ClusterNotFoundException":
950
- case "com.amazonaws.ecs#ClusterNotFoundException":
951
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
952
- case "InvalidParameterException":
953
- case "com.amazonaws.ecs#InvalidParameterException":
954
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
955
- case "ServerException":
956
- case "com.amazonaws.ecs#ServerException":
957
- throw await de_ServerExceptionRes(parsedOutput, context);
958
- default:
959
- const parsedBody = parsedOutput.body;
960
- return throwDefaultError({
961
- output,
962
- parsedBody,
963
- errorCode,
964
- });
965
- }
966
- };
967
- const de_DeregisterTaskDefinitionCommand = async (output, context) => {
968
- if (output.statusCode >= 300) {
969
- return de_DeregisterTaskDefinitionCommandError(output, context);
970
- }
971
- const data = await parseBody(output.body, context);
972
- let contents = {};
973
- contents = de_DeregisterTaskDefinitionResponse(data, context);
974
- const response = {
975
- $metadata: deserializeMetadata(output),
976
- ...contents,
977
- };
978
- return response;
979
- };
980
- exports.de_DeregisterTaskDefinitionCommand = de_DeregisterTaskDefinitionCommand;
981
- const de_DeregisterTaskDefinitionCommandError = async (output, context) => {
982
- const parsedOutput = {
983
- ...output,
984
- body: await parseErrorBody(output.body, context),
985
- };
986
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
- switch (errorCode) {
988
- case "ClientException":
989
- case "com.amazonaws.ecs#ClientException":
990
- throw await de_ClientExceptionRes(parsedOutput, context);
991
- case "InvalidParameterException":
992
- case "com.amazonaws.ecs#InvalidParameterException":
993
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
994
- case "ServerException":
995
- case "com.amazonaws.ecs#ServerException":
996
- throw await de_ServerExceptionRes(parsedOutput, context);
997
- default:
998
- const parsedBody = parsedOutput.body;
999
- return throwDefaultError({
1000
- output,
1001
- parsedBody,
1002
- errorCode,
1003
- });
1004
- }
1005
- };
1006
- const de_DescribeCapacityProvidersCommand = async (output, context) => {
1007
- if (output.statusCode >= 300) {
1008
- return de_DescribeCapacityProvidersCommandError(output, context);
1009
- }
1010
- const data = await parseBody(output.body, context);
1011
- let contents = {};
1012
- contents = (0, smithy_client_1._json)(data);
1013
- const response = {
1014
- $metadata: deserializeMetadata(output),
1015
- ...contents,
1016
- };
1017
- return response;
1018
- };
1019
- exports.de_DescribeCapacityProvidersCommand = de_DescribeCapacityProvidersCommand;
1020
- const de_DescribeCapacityProvidersCommandError = async (output, context) => {
1021
- const parsedOutput = {
1022
- ...output,
1023
- body: await parseErrorBody(output.body, context),
1024
- };
1025
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1026
- switch (errorCode) {
1027
- case "ClientException":
1028
- case "com.amazonaws.ecs#ClientException":
1029
- throw await de_ClientExceptionRes(parsedOutput, context);
1030
- case "InvalidParameterException":
1031
- case "com.amazonaws.ecs#InvalidParameterException":
1032
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1033
- case "ServerException":
1034
- case "com.amazonaws.ecs#ServerException":
1035
- throw await de_ServerExceptionRes(parsedOutput, context);
1036
- default:
1037
- const parsedBody = parsedOutput.body;
1038
- return throwDefaultError({
1039
- output,
1040
- parsedBody,
1041
- errorCode,
1042
- });
1043
- }
1044
- };
1045
- const de_DescribeClustersCommand = async (output, context) => {
1046
- if (output.statusCode >= 300) {
1047
- return de_DescribeClustersCommandError(output, context);
1048
- }
1049
- const data = await parseBody(output.body, context);
1050
- let contents = {};
1051
- contents = (0, smithy_client_1._json)(data);
1052
- const response = {
1053
- $metadata: deserializeMetadata(output),
1054
- ...contents,
1055
- };
1056
- return response;
1057
- };
1058
- exports.de_DescribeClustersCommand = de_DescribeClustersCommand;
1059
- const de_DescribeClustersCommandError = async (output, context) => {
1060
- const parsedOutput = {
1061
- ...output,
1062
- body: await parseErrorBody(output.body, context),
1063
- };
1064
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
- switch (errorCode) {
1066
- case "ClientException":
1067
- case "com.amazonaws.ecs#ClientException":
1068
- throw await de_ClientExceptionRes(parsedOutput, context);
1069
- case "InvalidParameterException":
1070
- case "com.amazonaws.ecs#InvalidParameterException":
1071
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1072
- case "ServerException":
1073
- case "com.amazonaws.ecs#ServerException":
1074
- throw await de_ServerExceptionRes(parsedOutput, context);
1075
- default:
1076
- const parsedBody = parsedOutput.body;
1077
- return throwDefaultError({
1078
- output,
1079
- parsedBody,
1080
- errorCode,
1081
- });
1082
- }
1083
- };
1084
- const de_DescribeContainerInstancesCommand = async (output, context) => {
1085
- if (output.statusCode >= 300) {
1086
- return de_DescribeContainerInstancesCommandError(output, context);
1087
- }
1088
- const data = await parseBody(output.body, context);
1089
- let contents = {};
1090
- contents = de_DescribeContainerInstancesResponse(data, context);
1091
- const response = {
1092
- $metadata: deserializeMetadata(output),
1093
- ...contents,
1094
- };
1095
- return response;
1096
- };
1097
- exports.de_DescribeContainerInstancesCommand = de_DescribeContainerInstancesCommand;
1098
- const de_DescribeContainerInstancesCommandError = async (output, context) => {
1099
- const parsedOutput = {
1100
- ...output,
1101
- body: await parseErrorBody(output.body, context),
1102
- };
1103
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1104
- switch (errorCode) {
1105
- case "ClientException":
1106
- case "com.amazonaws.ecs#ClientException":
1107
- throw await de_ClientExceptionRes(parsedOutput, context);
1108
- case "ClusterNotFoundException":
1109
- case "com.amazonaws.ecs#ClusterNotFoundException":
1110
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1111
- case "InvalidParameterException":
1112
- case "com.amazonaws.ecs#InvalidParameterException":
1113
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1114
- case "ServerException":
1115
- case "com.amazonaws.ecs#ServerException":
1116
- throw await de_ServerExceptionRes(parsedOutput, context);
1117
- default:
1118
- const parsedBody = parsedOutput.body;
1119
- return throwDefaultError({
1120
- output,
1121
- parsedBody,
1122
- errorCode,
1123
- });
1124
- }
1125
- };
1126
- const de_DescribeServicesCommand = async (output, context) => {
1127
- if (output.statusCode >= 300) {
1128
- return de_DescribeServicesCommandError(output, context);
1129
- }
1130
- const data = await parseBody(output.body, context);
1131
- let contents = {};
1132
- contents = de_DescribeServicesResponse(data, context);
1133
- const response = {
1134
- $metadata: deserializeMetadata(output),
1135
- ...contents,
1136
- };
1137
- return response;
1138
- };
1139
- exports.de_DescribeServicesCommand = de_DescribeServicesCommand;
1140
- const de_DescribeServicesCommandError = async (output, context) => {
1141
- const parsedOutput = {
1142
- ...output,
1143
- body: await parseErrorBody(output.body, context),
1144
- };
1145
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1146
- switch (errorCode) {
1147
- case "ClientException":
1148
- case "com.amazonaws.ecs#ClientException":
1149
- throw await de_ClientExceptionRes(parsedOutput, context);
1150
- case "ClusterNotFoundException":
1151
- case "com.amazonaws.ecs#ClusterNotFoundException":
1152
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1153
- case "InvalidParameterException":
1154
- case "com.amazonaws.ecs#InvalidParameterException":
1155
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1156
- case "ServerException":
1157
- case "com.amazonaws.ecs#ServerException":
1158
- throw await de_ServerExceptionRes(parsedOutput, context);
1159
- default:
1160
- const parsedBody = parsedOutput.body;
1161
- return throwDefaultError({
1162
- output,
1163
- parsedBody,
1164
- errorCode,
1165
- });
1166
- }
1167
- };
1168
- const de_DescribeTaskDefinitionCommand = async (output, context) => {
1169
- if (output.statusCode >= 300) {
1170
- return de_DescribeTaskDefinitionCommandError(output, context);
1171
- }
1172
- const data = await parseBody(output.body, context);
1173
- let contents = {};
1174
- contents = de_DescribeTaskDefinitionResponse(data, context);
1175
- const response = {
1176
- $metadata: deserializeMetadata(output),
1177
- ...contents,
1178
- };
1179
- return response;
1180
- };
1181
- exports.de_DescribeTaskDefinitionCommand = de_DescribeTaskDefinitionCommand;
1182
- const de_DescribeTaskDefinitionCommandError = async (output, context) => {
1183
- const parsedOutput = {
1184
- ...output,
1185
- body: await parseErrorBody(output.body, context),
1186
- };
1187
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1188
- switch (errorCode) {
1189
- case "ClientException":
1190
- case "com.amazonaws.ecs#ClientException":
1191
- throw await de_ClientExceptionRes(parsedOutput, context);
1192
- case "InvalidParameterException":
1193
- case "com.amazonaws.ecs#InvalidParameterException":
1194
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1195
- case "ServerException":
1196
- case "com.amazonaws.ecs#ServerException":
1197
- throw await de_ServerExceptionRes(parsedOutput, context);
1198
- default:
1199
- const parsedBody = parsedOutput.body;
1200
- return throwDefaultError({
1201
- output,
1202
- parsedBody,
1203
- errorCode,
1204
- });
1205
- }
1206
- };
1207
- const de_DescribeTasksCommand = async (output, context) => {
1208
- if (output.statusCode >= 300) {
1209
- return de_DescribeTasksCommandError(output, context);
1210
- }
1211
- const data = await parseBody(output.body, context);
1212
- let contents = {};
1213
- contents = de_DescribeTasksResponse(data, context);
1214
- const response = {
1215
- $metadata: deserializeMetadata(output),
1216
- ...contents,
1217
- };
1218
- return response;
1219
- };
1220
- exports.de_DescribeTasksCommand = de_DescribeTasksCommand;
1221
- const de_DescribeTasksCommandError = async (output, context) => {
1222
- const parsedOutput = {
1223
- ...output,
1224
- body: await parseErrorBody(output.body, context),
1225
- };
1226
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1227
- switch (errorCode) {
1228
- case "ClientException":
1229
- case "com.amazonaws.ecs#ClientException":
1230
- throw await de_ClientExceptionRes(parsedOutput, context);
1231
- case "ClusterNotFoundException":
1232
- case "com.amazonaws.ecs#ClusterNotFoundException":
1233
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1234
- case "InvalidParameterException":
1235
- case "com.amazonaws.ecs#InvalidParameterException":
1236
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1237
- case "ServerException":
1238
- case "com.amazonaws.ecs#ServerException":
1239
- throw await de_ServerExceptionRes(parsedOutput, context);
1240
- default:
1241
- const parsedBody = parsedOutput.body;
1242
- return throwDefaultError({
1243
- output,
1244
- parsedBody,
1245
- errorCode,
1246
- });
1247
- }
1248
- };
1249
- const de_DescribeTaskSetsCommand = async (output, context) => {
1250
- if (output.statusCode >= 300) {
1251
- return de_DescribeTaskSetsCommandError(output, context);
1252
- }
1253
- const data = await parseBody(output.body, context);
1254
- let contents = {};
1255
- contents = de_DescribeTaskSetsResponse(data, context);
1256
- const response = {
1257
- $metadata: deserializeMetadata(output),
1258
- ...contents,
1259
- };
1260
- return response;
1261
- };
1262
- exports.de_DescribeTaskSetsCommand = de_DescribeTaskSetsCommand;
1263
- const de_DescribeTaskSetsCommandError = async (output, context) => {
1264
- const parsedOutput = {
1265
- ...output,
1266
- body: await parseErrorBody(output.body, context),
1267
- };
1268
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
- switch (errorCode) {
1270
- case "AccessDeniedException":
1271
- case "com.amazonaws.ecs#AccessDeniedException":
1272
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1273
- case "ClientException":
1274
- case "com.amazonaws.ecs#ClientException":
1275
- throw await de_ClientExceptionRes(parsedOutput, context);
1276
- case "ClusterNotFoundException":
1277
- case "com.amazonaws.ecs#ClusterNotFoundException":
1278
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1279
- case "InvalidParameterException":
1280
- case "com.amazonaws.ecs#InvalidParameterException":
1281
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1282
- case "ServerException":
1283
- case "com.amazonaws.ecs#ServerException":
1284
- throw await de_ServerExceptionRes(parsedOutput, context);
1285
- case "ServiceNotActiveException":
1286
- case "com.amazonaws.ecs#ServiceNotActiveException":
1287
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
1288
- case "ServiceNotFoundException":
1289
- case "com.amazonaws.ecs#ServiceNotFoundException":
1290
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
1291
- case "UnsupportedFeatureException":
1292
- case "com.amazonaws.ecs#UnsupportedFeatureException":
1293
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
1294
- default:
1295
- const parsedBody = parsedOutput.body;
1296
- return throwDefaultError({
1297
- output,
1298
- parsedBody,
1299
- errorCode,
1300
- });
1301
- }
1302
- };
1303
- const de_DiscoverPollEndpointCommand = async (output, context) => {
1304
- if (output.statusCode >= 300) {
1305
- return de_DiscoverPollEndpointCommandError(output, context);
1306
- }
1307
- const data = await parseBody(output.body, context);
1308
- let contents = {};
1309
- contents = (0, smithy_client_1._json)(data);
1310
- const response = {
1311
- $metadata: deserializeMetadata(output),
1312
- ...contents,
1313
- };
1314
- return response;
1315
- };
1316
- exports.de_DiscoverPollEndpointCommand = de_DiscoverPollEndpointCommand;
1317
- const de_DiscoverPollEndpointCommandError = async (output, context) => {
1318
- const parsedOutput = {
1319
- ...output,
1320
- body: await parseErrorBody(output.body, context),
1321
- };
1322
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1323
- switch (errorCode) {
1324
- case "ClientException":
1325
- case "com.amazonaws.ecs#ClientException":
1326
- throw await de_ClientExceptionRes(parsedOutput, context);
1327
- case "ServerException":
1328
- case "com.amazonaws.ecs#ServerException":
1329
- throw await de_ServerExceptionRes(parsedOutput, context);
1330
- default:
1331
- const parsedBody = parsedOutput.body;
1332
- return throwDefaultError({
1333
- output,
1334
- parsedBody,
1335
- errorCode,
1336
- });
1337
- }
1338
- };
1339
- const de_ExecuteCommandCommand = async (output, context) => {
1340
- if (output.statusCode >= 300) {
1341
- return de_ExecuteCommandCommandError(output, context);
1342
- }
1343
- const data = await parseBody(output.body, context);
1344
- let contents = {};
1345
- contents = (0, smithy_client_1._json)(data);
1346
- const response = {
1347
- $metadata: deserializeMetadata(output),
1348
- ...contents,
1349
- };
1350
- return response;
1351
- };
1352
- exports.de_ExecuteCommandCommand = de_ExecuteCommandCommand;
1353
- const de_ExecuteCommandCommandError = async (output, context) => {
1354
- const parsedOutput = {
1355
- ...output,
1356
- body: await parseErrorBody(output.body, context),
1357
- };
1358
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1359
- switch (errorCode) {
1360
- case "AccessDeniedException":
1361
- case "com.amazonaws.ecs#AccessDeniedException":
1362
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1363
- case "ClientException":
1364
- case "com.amazonaws.ecs#ClientException":
1365
- throw await de_ClientExceptionRes(parsedOutput, context);
1366
- case "ClusterNotFoundException":
1367
- case "com.amazonaws.ecs#ClusterNotFoundException":
1368
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1369
- case "InvalidParameterException":
1370
- case "com.amazonaws.ecs#InvalidParameterException":
1371
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1372
- case "ServerException":
1373
- case "com.amazonaws.ecs#ServerException":
1374
- throw await de_ServerExceptionRes(parsedOutput, context);
1375
- case "TargetNotConnectedException":
1376
- case "com.amazonaws.ecs#TargetNotConnectedException":
1377
- throw await de_TargetNotConnectedExceptionRes(parsedOutput, context);
1378
- default:
1379
- const parsedBody = parsedOutput.body;
1380
- return throwDefaultError({
1381
- output,
1382
- parsedBody,
1383
- errorCode,
1384
- });
1385
- }
1386
- };
1387
- const de_GetTaskProtectionCommand = async (output, context) => {
1388
- if (output.statusCode >= 300) {
1389
- return de_GetTaskProtectionCommandError(output, context);
1390
- }
1391
- const data = await parseBody(output.body, context);
1392
- let contents = {};
1393
- contents = de_GetTaskProtectionResponse(data, context);
1394
- const response = {
1395
- $metadata: deserializeMetadata(output),
1396
- ...contents,
1397
- };
1398
- return response;
1399
- };
1400
- exports.de_GetTaskProtectionCommand = de_GetTaskProtectionCommand;
1401
- const de_GetTaskProtectionCommandError = async (output, context) => {
1402
- const parsedOutput = {
1403
- ...output,
1404
- body: await parseErrorBody(output.body, context),
1405
- };
1406
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1407
- switch (errorCode) {
1408
- case "AccessDeniedException":
1409
- case "com.amazonaws.ecs#AccessDeniedException":
1410
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1411
- case "ClientException":
1412
- case "com.amazonaws.ecs#ClientException":
1413
- throw await de_ClientExceptionRes(parsedOutput, context);
1414
- case "ClusterNotFoundException":
1415
- case "com.amazonaws.ecs#ClusterNotFoundException":
1416
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1417
- case "InvalidParameterException":
1418
- case "com.amazonaws.ecs#InvalidParameterException":
1419
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1420
- case "ResourceNotFoundException":
1421
- case "com.amazonaws.ecs#ResourceNotFoundException":
1422
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1423
- case "ServerException":
1424
- case "com.amazonaws.ecs#ServerException":
1425
- throw await de_ServerExceptionRes(parsedOutput, context);
1426
- case "UnsupportedFeatureException":
1427
- case "com.amazonaws.ecs#UnsupportedFeatureException":
1428
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
1429
- default:
1430
- const parsedBody = parsedOutput.body;
1431
- return throwDefaultError({
1432
- output,
1433
- parsedBody,
1434
- errorCode,
1435
- });
1436
- }
1437
- };
1438
- const de_ListAccountSettingsCommand = async (output, context) => {
1439
- if (output.statusCode >= 300) {
1440
- return de_ListAccountSettingsCommandError(output, context);
1441
- }
1442
- const data = await parseBody(output.body, context);
1443
- let contents = {};
1444
- contents = (0, smithy_client_1._json)(data);
1445
- const response = {
1446
- $metadata: deserializeMetadata(output),
1447
- ...contents,
1448
- };
1449
- return response;
1450
- };
1451
- exports.de_ListAccountSettingsCommand = de_ListAccountSettingsCommand;
1452
- const de_ListAccountSettingsCommandError = async (output, context) => {
1453
- const parsedOutput = {
1454
- ...output,
1455
- body: await parseErrorBody(output.body, context),
1456
- };
1457
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1458
- switch (errorCode) {
1459
- case "ClientException":
1460
- case "com.amazonaws.ecs#ClientException":
1461
- throw await de_ClientExceptionRes(parsedOutput, context);
1462
- case "InvalidParameterException":
1463
- case "com.amazonaws.ecs#InvalidParameterException":
1464
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1465
- case "ServerException":
1466
- case "com.amazonaws.ecs#ServerException":
1467
- throw await de_ServerExceptionRes(parsedOutput, context);
1468
- default:
1469
- const parsedBody = parsedOutput.body;
1470
- return throwDefaultError({
1471
- output,
1472
- parsedBody,
1473
- errorCode,
1474
- });
1475
- }
1476
- };
1477
- const de_ListAttributesCommand = async (output, context) => {
1478
- if (output.statusCode >= 300) {
1479
- return de_ListAttributesCommandError(output, context);
1480
- }
1481
- const data = await parseBody(output.body, context);
1482
- let contents = {};
1483
- contents = (0, smithy_client_1._json)(data);
1484
- const response = {
1485
- $metadata: deserializeMetadata(output),
1486
- ...contents,
1487
- };
1488
- return response;
1489
- };
1490
- exports.de_ListAttributesCommand = de_ListAttributesCommand;
1491
- const de_ListAttributesCommandError = async (output, context) => {
1492
- const parsedOutput = {
1493
- ...output,
1494
- body: await parseErrorBody(output.body, context),
1495
- };
1496
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1497
- switch (errorCode) {
1498
- case "ClusterNotFoundException":
1499
- case "com.amazonaws.ecs#ClusterNotFoundException":
1500
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1501
- case "InvalidParameterException":
1502
- case "com.amazonaws.ecs#InvalidParameterException":
1503
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1504
- default:
1505
- const parsedBody = parsedOutput.body;
1506
- return throwDefaultError({
1507
- output,
1508
- parsedBody,
1509
- errorCode,
1510
- });
1511
- }
1512
- };
1513
- const de_ListClustersCommand = async (output, context) => {
1514
- if (output.statusCode >= 300) {
1515
- return de_ListClustersCommandError(output, context);
1516
- }
1517
- const data = await parseBody(output.body, context);
1518
- let contents = {};
1519
- contents = (0, smithy_client_1._json)(data);
1520
- const response = {
1521
- $metadata: deserializeMetadata(output),
1522
- ...contents,
1523
- };
1524
- return response;
1525
- };
1526
- exports.de_ListClustersCommand = de_ListClustersCommand;
1527
- const de_ListClustersCommandError = async (output, context) => {
1528
- const parsedOutput = {
1529
- ...output,
1530
- body: await parseErrorBody(output.body, context),
1531
- };
1532
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1533
- switch (errorCode) {
1534
- case "ClientException":
1535
- case "com.amazonaws.ecs#ClientException":
1536
- throw await de_ClientExceptionRes(parsedOutput, context);
1537
- case "InvalidParameterException":
1538
- case "com.amazonaws.ecs#InvalidParameterException":
1539
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1540
- case "ServerException":
1541
- case "com.amazonaws.ecs#ServerException":
1542
- throw await de_ServerExceptionRes(parsedOutput, context);
1543
- default:
1544
- const parsedBody = parsedOutput.body;
1545
- return throwDefaultError({
1546
- output,
1547
- parsedBody,
1548
- errorCode,
1549
- });
1550
- }
1551
- };
1552
- const de_ListContainerInstancesCommand = async (output, context) => {
1553
- if (output.statusCode >= 300) {
1554
- return de_ListContainerInstancesCommandError(output, context);
1555
- }
1556
- const data = await parseBody(output.body, context);
1557
- let contents = {};
1558
- contents = (0, smithy_client_1._json)(data);
1559
- const response = {
1560
- $metadata: deserializeMetadata(output),
1561
- ...contents,
1562
- };
1563
- return response;
1564
- };
1565
- exports.de_ListContainerInstancesCommand = de_ListContainerInstancesCommand;
1566
- const de_ListContainerInstancesCommandError = async (output, context) => {
1567
- const parsedOutput = {
1568
- ...output,
1569
- body: await parseErrorBody(output.body, context),
1570
- };
1571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1572
- switch (errorCode) {
1573
- case "ClientException":
1574
- case "com.amazonaws.ecs#ClientException":
1575
- throw await de_ClientExceptionRes(parsedOutput, context);
1576
- case "ClusterNotFoundException":
1577
- case "com.amazonaws.ecs#ClusterNotFoundException":
1578
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1579
- case "InvalidParameterException":
1580
- case "com.amazonaws.ecs#InvalidParameterException":
1581
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1582
- case "ServerException":
1583
- case "com.amazonaws.ecs#ServerException":
1584
- throw await de_ServerExceptionRes(parsedOutput, context);
1585
- default:
1586
- const parsedBody = parsedOutput.body;
1587
- return throwDefaultError({
1588
- output,
1589
- parsedBody,
1590
- errorCode,
1591
- });
1592
- }
1593
- };
1594
- const de_ListServicesCommand = async (output, context) => {
1595
- if (output.statusCode >= 300) {
1596
- return de_ListServicesCommandError(output, context);
1597
- }
1598
- const data = await parseBody(output.body, context);
1599
- let contents = {};
1600
- contents = (0, smithy_client_1._json)(data);
1601
- const response = {
1602
- $metadata: deserializeMetadata(output),
1603
- ...contents,
1604
- };
1605
- return response;
1606
- };
1607
- exports.de_ListServicesCommand = de_ListServicesCommand;
1608
- const de_ListServicesCommandError = async (output, context) => {
1609
- const parsedOutput = {
1610
- ...output,
1611
- body: await parseErrorBody(output.body, context),
1612
- };
1613
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1614
- switch (errorCode) {
1615
- case "ClientException":
1616
- case "com.amazonaws.ecs#ClientException":
1617
- throw await de_ClientExceptionRes(parsedOutput, context);
1618
- case "ClusterNotFoundException":
1619
- case "com.amazonaws.ecs#ClusterNotFoundException":
1620
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1621
- case "InvalidParameterException":
1622
- case "com.amazonaws.ecs#InvalidParameterException":
1623
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1624
- case "ServerException":
1625
- case "com.amazonaws.ecs#ServerException":
1626
- throw await de_ServerExceptionRes(parsedOutput, context);
1627
- default:
1628
- const parsedBody = parsedOutput.body;
1629
- return throwDefaultError({
1630
- output,
1631
- parsedBody,
1632
- errorCode,
1633
- });
1634
- }
1635
- };
1636
- const de_ListServicesByNamespaceCommand = async (output, context) => {
1637
- if (output.statusCode >= 300) {
1638
- return de_ListServicesByNamespaceCommandError(output, context);
1639
- }
1640
- const data = await parseBody(output.body, context);
1641
- let contents = {};
1642
- contents = (0, smithy_client_1._json)(data);
1643
- const response = {
1644
- $metadata: deserializeMetadata(output),
1645
- ...contents,
1646
- };
1647
- return response;
1648
- };
1649
- exports.de_ListServicesByNamespaceCommand = de_ListServicesByNamespaceCommand;
1650
- const de_ListServicesByNamespaceCommandError = async (output, context) => {
1651
- const parsedOutput = {
1652
- ...output,
1653
- body: await parseErrorBody(output.body, context),
1654
- };
1655
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1656
- switch (errorCode) {
1657
- case "ClientException":
1658
- case "com.amazonaws.ecs#ClientException":
1659
- throw await de_ClientExceptionRes(parsedOutput, context);
1660
- case "InvalidParameterException":
1661
- case "com.amazonaws.ecs#InvalidParameterException":
1662
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1663
- case "NamespaceNotFoundException":
1664
- case "com.amazonaws.ecs#NamespaceNotFoundException":
1665
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
1666
- case "ServerException":
1667
- case "com.amazonaws.ecs#ServerException":
1668
- throw await de_ServerExceptionRes(parsedOutput, context);
1669
- default:
1670
- const parsedBody = parsedOutput.body;
1671
- return throwDefaultError({
1672
- output,
1673
- parsedBody,
1674
- errorCode,
1675
- });
1676
- }
1677
- };
1678
- const de_ListTagsForResourceCommand = async (output, context) => {
1679
- if (output.statusCode >= 300) {
1680
- return de_ListTagsForResourceCommandError(output, context);
1681
- }
1682
- const data = await parseBody(output.body, context);
1683
- let contents = {};
1684
- contents = (0, smithy_client_1._json)(data);
1685
- const response = {
1686
- $metadata: deserializeMetadata(output),
1687
- ...contents,
1688
- };
1689
- return response;
1690
- };
1691
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1692
- const de_ListTagsForResourceCommandError = async (output, context) => {
1693
- const parsedOutput = {
1694
- ...output,
1695
- body: await parseErrorBody(output.body, context),
1696
- };
1697
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1698
- switch (errorCode) {
1699
- case "ClientException":
1700
- case "com.amazonaws.ecs#ClientException":
1701
- throw await de_ClientExceptionRes(parsedOutput, context);
1702
- case "ClusterNotFoundException":
1703
- case "com.amazonaws.ecs#ClusterNotFoundException":
1704
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1705
- case "InvalidParameterException":
1706
- case "com.amazonaws.ecs#InvalidParameterException":
1707
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1708
- case "ServerException":
1709
- case "com.amazonaws.ecs#ServerException":
1710
- throw await de_ServerExceptionRes(parsedOutput, context);
1711
- default:
1712
- const parsedBody = parsedOutput.body;
1713
- return throwDefaultError({
1714
- output,
1715
- parsedBody,
1716
- errorCode,
1717
- });
1718
- }
1719
- };
1720
- const de_ListTaskDefinitionFamiliesCommand = async (output, context) => {
1721
- if (output.statusCode >= 300) {
1722
- return de_ListTaskDefinitionFamiliesCommandError(output, context);
1723
- }
1724
- const data = await parseBody(output.body, context);
1725
- let contents = {};
1726
- contents = (0, smithy_client_1._json)(data);
1727
- const response = {
1728
- $metadata: deserializeMetadata(output),
1729
- ...contents,
1730
- };
1731
- return response;
1732
- };
1733
- exports.de_ListTaskDefinitionFamiliesCommand = de_ListTaskDefinitionFamiliesCommand;
1734
- const de_ListTaskDefinitionFamiliesCommandError = async (output, context) => {
1735
- const parsedOutput = {
1736
- ...output,
1737
- body: await parseErrorBody(output.body, context),
1738
- };
1739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1740
- switch (errorCode) {
1741
- case "ClientException":
1742
- case "com.amazonaws.ecs#ClientException":
1743
- throw await de_ClientExceptionRes(parsedOutput, context);
1744
- case "InvalidParameterException":
1745
- case "com.amazonaws.ecs#InvalidParameterException":
1746
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1747
- case "ServerException":
1748
- case "com.amazonaws.ecs#ServerException":
1749
- throw await de_ServerExceptionRes(parsedOutput, context);
1750
- default:
1751
- const parsedBody = parsedOutput.body;
1752
- return throwDefaultError({
1753
- output,
1754
- parsedBody,
1755
- errorCode,
1756
- });
1757
- }
1758
- };
1759
- const de_ListTaskDefinitionsCommand = async (output, context) => {
1760
- if (output.statusCode >= 300) {
1761
- return de_ListTaskDefinitionsCommandError(output, context);
1762
- }
1763
- const data = await parseBody(output.body, context);
1764
- let contents = {};
1765
- contents = (0, smithy_client_1._json)(data);
1766
- const response = {
1767
- $metadata: deserializeMetadata(output),
1768
- ...contents,
1769
- };
1770
- return response;
1771
- };
1772
- exports.de_ListTaskDefinitionsCommand = de_ListTaskDefinitionsCommand;
1773
- const de_ListTaskDefinitionsCommandError = async (output, context) => {
1774
- const parsedOutput = {
1775
- ...output,
1776
- body: await parseErrorBody(output.body, context),
1777
- };
1778
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1779
- switch (errorCode) {
1780
- case "ClientException":
1781
- case "com.amazonaws.ecs#ClientException":
1782
- throw await de_ClientExceptionRes(parsedOutput, context);
1783
- case "InvalidParameterException":
1784
- case "com.amazonaws.ecs#InvalidParameterException":
1785
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1786
- case "ServerException":
1787
- case "com.amazonaws.ecs#ServerException":
1788
- throw await de_ServerExceptionRes(parsedOutput, context);
1789
- default:
1790
- const parsedBody = parsedOutput.body;
1791
- return throwDefaultError({
1792
- output,
1793
- parsedBody,
1794
- errorCode,
1795
- });
1796
- }
1797
- };
1798
- const de_ListTasksCommand = async (output, context) => {
1799
- if (output.statusCode >= 300) {
1800
- return de_ListTasksCommandError(output, context);
1801
- }
1802
- const data = await parseBody(output.body, context);
1803
- let contents = {};
1804
- contents = (0, smithy_client_1._json)(data);
1805
- const response = {
1806
- $metadata: deserializeMetadata(output),
1807
- ...contents,
1808
- };
1809
- return response;
1810
- };
1811
- exports.de_ListTasksCommand = de_ListTasksCommand;
1812
- const de_ListTasksCommandError = async (output, context) => {
1813
- const parsedOutput = {
1814
- ...output,
1815
- body: await parseErrorBody(output.body, context),
1816
- };
1817
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1818
- switch (errorCode) {
1819
- case "ClientException":
1820
- case "com.amazonaws.ecs#ClientException":
1821
- throw await de_ClientExceptionRes(parsedOutput, context);
1822
- case "ClusterNotFoundException":
1823
- case "com.amazonaws.ecs#ClusterNotFoundException":
1824
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1825
- case "InvalidParameterException":
1826
- case "com.amazonaws.ecs#InvalidParameterException":
1827
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1828
- case "ServerException":
1829
- case "com.amazonaws.ecs#ServerException":
1830
- throw await de_ServerExceptionRes(parsedOutput, context);
1831
- case "ServiceNotFoundException":
1832
- case "com.amazonaws.ecs#ServiceNotFoundException":
1833
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
1834
- default:
1835
- const parsedBody = parsedOutput.body;
1836
- return throwDefaultError({
1837
- output,
1838
- parsedBody,
1839
- errorCode,
1840
- });
1841
- }
1842
- };
1843
- const de_PutAccountSettingCommand = async (output, context) => {
1844
- if (output.statusCode >= 300) {
1845
- return de_PutAccountSettingCommandError(output, context);
1846
- }
1847
- const data = await parseBody(output.body, context);
1848
- let contents = {};
1849
- contents = (0, smithy_client_1._json)(data);
1850
- const response = {
1851
- $metadata: deserializeMetadata(output),
1852
- ...contents,
1853
- };
1854
- return response;
1855
- };
1856
- exports.de_PutAccountSettingCommand = de_PutAccountSettingCommand;
1857
- const de_PutAccountSettingCommandError = async (output, context) => {
1858
- const parsedOutput = {
1859
- ...output,
1860
- body: await parseErrorBody(output.body, context),
1861
- };
1862
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1863
- switch (errorCode) {
1864
- case "ClientException":
1865
- case "com.amazonaws.ecs#ClientException":
1866
- throw await de_ClientExceptionRes(parsedOutput, context);
1867
- case "InvalidParameterException":
1868
- case "com.amazonaws.ecs#InvalidParameterException":
1869
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1870
- case "ServerException":
1871
- case "com.amazonaws.ecs#ServerException":
1872
- throw await de_ServerExceptionRes(parsedOutput, context);
1873
- default:
1874
- const parsedBody = parsedOutput.body;
1875
- return throwDefaultError({
1876
- output,
1877
- parsedBody,
1878
- errorCode,
1879
- });
1880
- }
1881
- };
1882
- const de_PutAccountSettingDefaultCommand = async (output, context) => {
1883
- if (output.statusCode >= 300) {
1884
- return de_PutAccountSettingDefaultCommandError(output, context);
1885
- }
1886
- const data = await parseBody(output.body, context);
1887
- let contents = {};
1888
- contents = (0, smithy_client_1._json)(data);
1889
- const response = {
1890
- $metadata: deserializeMetadata(output),
1891
- ...contents,
1892
- };
1893
- return response;
1894
- };
1895
- exports.de_PutAccountSettingDefaultCommand = de_PutAccountSettingDefaultCommand;
1896
- const de_PutAccountSettingDefaultCommandError = async (output, context) => {
1897
- const parsedOutput = {
1898
- ...output,
1899
- body: await parseErrorBody(output.body, context),
1900
- };
1901
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1902
- switch (errorCode) {
1903
- case "ClientException":
1904
- case "com.amazonaws.ecs#ClientException":
1905
- throw await de_ClientExceptionRes(parsedOutput, context);
1906
- case "InvalidParameterException":
1907
- case "com.amazonaws.ecs#InvalidParameterException":
1908
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1909
- case "ServerException":
1910
- case "com.amazonaws.ecs#ServerException":
1911
- throw await de_ServerExceptionRes(parsedOutput, context);
1912
- default:
1913
- const parsedBody = parsedOutput.body;
1914
- return throwDefaultError({
1915
- output,
1916
- parsedBody,
1917
- errorCode,
1918
- });
1919
- }
1920
- };
1921
- const de_PutAttributesCommand = async (output, context) => {
1922
- if (output.statusCode >= 300) {
1923
- return de_PutAttributesCommandError(output, context);
1924
- }
1925
- const data = await parseBody(output.body, context);
1926
- let contents = {};
1927
- contents = (0, smithy_client_1._json)(data);
1928
- const response = {
1929
- $metadata: deserializeMetadata(output),
1930
- ...contents,
1931
- };
1932
- return response;
1933
- };
1934
- exports.de_PutAttributesCommand = de_PutAttributesCommand;
1935
- const de_PutAttributesCommandError = async (output, context) => {
1936
- const parsedOutput = {
1937
- ...output,
1938
- body: await parseErrorBody(output.body, context),
1939
- };
1940
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1941
- switch (errorCode) {
1942
- case "AttributeLimitExceededException":
1943
- case "com.amazonaws.ecs#AttributeLimitExceededException":
1944
- throw await de_AttributeLimitExceededExceptionRes(parsedOutput, context);
1945
- case "ClusterNotFoundException":
1946
- case "com.amazonaws.ecs#ClusterNotFoundException":
1947
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1948
- case "InvalidParameterException":
1949
- case "com.amazonaws.ecs#InvalidParameterException":
1950
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1951
- case "TargetNotFoundException":
1952
- case "com.amazonaws.ecs#TargetNotFoundException":
1953
- throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
1954
- default:
1955
- const parsedBody = parsedOutput.body;
1956
- return throwDefaultError({
1957
- output,
1958
- parsedBody,
1959
- errorCode,
1960
- });
1961
- }
1962
- };
1963
- const de_PutClusterCapacityProvidersCommand = async (output, context) => {
1964
- if (output.statusCode >= 300) {
1965
- return de_PutClusterCapacityProvidersCommandError(output, context);
1966
- }
1967
- const data = await parseBody(output.body, context);
1968
- let contents = {};
1969
- contents = (0, smithy_client_1._json)(data);
1970
- const response = {
1971
- $metadata: deserializeMetadata(output),
1972
- ...contents,
1973
- };
1974
- return response;
1975
- };
1976
- exports.de_PutClusterCapacityProvidersCommand = de_PutClusterCapacityProvidersCommand;
1977
- const de_PutClusterCapacityProvidersCommandError = async (output, context) => {
1978
- const parsedOutput = {
1979
- ...output,
1980
- body: await parseErrorBody(output.body, context),
1981
- };
1982
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1983
- switch (errorCode) {
1984
- case "ClientException":
1985
- case "com.amazonaws.ecs#ClientException":
1986
- throw await de_ClientExceptionRes(parsedOutput, context);
1987
- case "ClusterNotFoundException":
1988
- case "com.amazonaws.ecs#ClusterNotFoundException":
1989
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
1990
- case "InvalidParameterException":
1991
- case "com.amazonaws.ecs#InvalidParameterException":
1992
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1993
- case "ResourceInUseException":
1994
- case "com.amazonaws.ecs#ResourceInUseException":
1995
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1996
- case "ServerException":
1997
- case "com.amazonaws.ecs#ServerException":
1998
- throw await de_ServerExceptionRes(parsedOutput, context);
1999
- case "UpdateInProgressException":
2000
- case "com.amazonaws.ecs#UpdateInProgressException":
2001
- throw await de_UpdateInProgressExceptionRes(parsedOutput, context);
2002
- default:
2003
- const parsedBody = parsedOutput.body;
2004
- return throwDefaultError({
2005
- output,
2006
- parsedBody,
2007
- errorCode,
2008
- });
2009
- }
2010
- };
2011
- const de_RegisterContainerInstanceCommand = async (output, context) => {
2012
- if (output.statusCode >= 300) {
2013
- return de_RegisterContainerInstanceCommandError(output, context);
2014
- }
2015
- const data = await parseBody(output.body, context);
2016
- let contents = {};
2017
- contents = de_RegisterContainerInstanceResponse(data, context);
2018
- const response = {
2019
- $metadata: deserializeMetadata(output),
2020
- ...contents,
2021
- };
2022
- return response;
2023
- };
2024
- exports.de_RegisterContainerInstanceCommand = de_RegisterContainerInstanceCommand;
2025
- const de_RegisterContainerInstanceCommandError = async (output, context) => {
2026
- const parsedOutput = {
2027
- ...output,
2028
- body: await parseErrorBody(output.body, context),
2029
- };
2030
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2031
- switch (errorCode) {
2032
- case "ClientException":
2033
- case "com.amazonaws.ecs#ClientException":
2034
- throw await de_ClientExceptionRes(parsedOutput, context);
2035
- case "InvalidParameterException":
2036
- case "com.amazonaws.ecs#InvalidParameterException":
2037
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2038
- case "ServerException":
2039
- case "com.amazonaws.ecs#ServerException":
2040
- throw await de_ServerExceptionRes(parsedOutput, context);
2041
- default:
2042
- const parsedBody = parsedOutput.body;
2043
- return throwDefaultError({
2044
- output,
2045
- parsedBody,
2046
- errorCode,
2047
- });
2048
- }
2049
- };
2050
- const de_RegisterTaskDefinitionCommand = async (output, context) => {
2051
- if (output.statusCode >= 300) {
2052
- return de_RegisterTaskDefinitionCommandError(output, context);
2053
- }
2054
- const data = await parseBody(output.body, context);
2055
- let contents = {};
2056
- contents = de_RegisterTaskDefinitionResponse(data, context);
2057
- const response = {
2058
- $metadata: deserializeMetadata(output),
2059
- ...contents,
2060
- };
2061
- return response;
2062
- };
2063
- exports.de_RegisterTaskDefinitionCommand = de_RegisterTaskDefinitionCommand;
2064
- const de_RegisterTaskDefinitionCommandError = async (output, context) => {
2065
- const parsedOutput = {
2066
- ...output,
2067
- body: await parseErrorBody(output.body, context),
2068
- };
2069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2070
- switch (errorCode) {
2071
- case "ClientException":
2072
- case "com.amazonaws.ecs#ClientException":
2073
- throw await de_ClientExceptionRes(parsedOutput, context);
2074
- case "InvalidParameterException":
2075
- case "com.amazonaws.ecs#InvalidParameterException":
2076
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2077
- case "ServerException":
2078
- case "com.amazonaws.ecs#ServerException":
2079
- throw await de_ServerExceptionRes(parsedOutput, context);
2080
- default:
2081
- const parsedBody = parsedOutput.body;
2082
- return throwDefaultError({
2083
- output,
2084
- parsedBody,
2085
- errorCode,
2086
- });
2087
- }
2088
- };
2089
- const de_RunTaskCommand = async (output, context) => {
2090
- if (output.statusCode >= 300) {
2091
- return de_RunTaskCommandError(output, context);
2092
- }
2093
- const data = await parseBody(output.body, context);
2094
- let contents = {};
2095
- contents = de_RunTaskResponse(data, context);
2096
- const response = {
2097
- $metadata: deserializeMetadata(output),
2098
- ...contents,
2099
- };
2100
- return response;
2101
- };
2102
- exports.de_RunTaskCommand = de_RunTaskCommand;
2103
- const de_RunTaskCommandError = async (output, context) => {
2104
- const parsedOutput = {
2105
- ...output,
2106
- body: await parseErrorBody(output.body, context),
2107
- };
2108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
- switch (errorCode) {
2110
- case "AccessDeniedException":
2111
- case "com.amazonaws.ecs#AccessDeniedException":
2112
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2113
- case "BlockedException":
2114
- case "com.amazonaws.ecs#BlockedException":
2115
- throw await de_BlockedExceptionRes(parsedOutput, context);
2116
- case "ClientException":
2117
- case "com.amazonaws.ecs#ClientException":
2118
- throw await de_ClientExceptionRes(parsedOutput, context);
2119
- case "ClusterNotFoundException":
2120
- case "com.amazonaws.ecs#ClusterNotFoundException":
2121
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2122
- case "ConflictException":
2123
- case "com.amazonaws.ecs#ConflictException":
2124
- throw await de_ConflictExceptionRes(parsedOutput, context);
2125
- case "InvalidParameterException":
2126
- case "com.amazonaws.ecs#InvalidParameterException":
2127
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2128
- case "PlatformTaskDefinitionIncompatibilityException":
2129
- case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException":
2130
- throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context);
2131
- case "PlatformUnknownException":
2132
- case "com.amazonaws.ecs#PlatformUnknownException":
2133
- throw await de_PlatformUnknownExceptionRes(parsedOutput, context);
2134
- case "ServerException":
2135
- case "com.amazonaws.ecs#ServerException":
2136
- throw await de_ServerExceptionRes(parsedOutput, context);
2137
- case "UnsupportedFeatureException":
2138
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2139
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2140
- default:
2141
- const parsedBody = parsedOutput.body;
2142
- return throwDefaultError({
2143
- output,
2144
- parsedBody,
2145
- errorCode,
2146
- });
2147
- }
2148
- };
2149
- const de_StartTaskCommand = async (output, context) => {
2150
- if (output.statusCode >= 300) {
2151
- return de_StartTaskCommandError(output, context);
2152
- }
2153
- const data = await parseBody(output.body, context);
2154
- let contents = {};
2155
- contents = de_StartTaskResponse(data, context);
2156
- const response = {
2157
- $metadata: deserializeMetadata(output),
2158
- ...contents,
2159
- };
2160
- return response;
2161
- };
2162
- exports.de_StartTaskCommand = de_StartTaskCommand;
2163
- const de_StartTaskCommandError = async (output, context) => {
2164
- const parsedOutput = {
2165
- ...output,
2166
- body: await parseErrorBody(output.body, context),
2167
- };
2168
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2169
- switch (errorCode) {
2170
- case "ClientException":
2171
- case "com.amazonaws.ecs#ClientException":
2172
- throw await de_ClientExceptionRes(parsedOutput, context);
2173
- case "ClusterNotFoundException":
2174
- case "com.amazonaws.ecs#ClusterNotFoundException":
2175
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2176
- case "InvalidParameterException":
2177
- case "com.amazonaws.ecs#InvalidParameterException":
2178
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2179
- case "ServerException":
2180
- case "com.amazonaws.ecs#ServerException":
2181
- throw await de_ServerExceptionRes(parsedOutput, context);
2182
- case "UnsupportedFeatureException":
2183
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2184
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2185
- default:
2186
- const parsedBody = parsedOutput.body;
2187
- return throwDefaultError({
2188
- output,
2189
- parsedBody,
2190
- errorCode,
2191
- });
2192
- }
2193
- };
2194
- const de_StopTaskCommand = async (output, context) => {
2195
- if (output.statusCode >= 300) {
2196
- return de_StopTaskCommandError(output, context);
2197
- }
2198
- const data = await parseBody(output.body, context);
2199
- let contents = {};
2200
- contents = de_StopTaskResponse(data, context);
2201
- const response = {
2202
- $metadata: deserializeMetadata(output),
2203
- ...contents,
2204
- };
2205
- return response;
2206
- };
2207
- exports.de_StopTaskCommand = de_StopTaskCommand;
2208
- const de_StopTaskCommandError = async (output, context) => {
2209
- const parsedOutput = {
2210
- ...output,
2211
- body: await parseErrorBody(output.body, context),
2212
- };
2213
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2214
- switch (errorCode) {
2215
- case "ClientException":
2216
- case "com.amazonaws.ecs#ClientException":
2217
- throw await de_ClientExceptionRes(parsedOutput, context);
2218
- case "ClusterNotFoundException":
2219
- case "com.amazonaws.ecs#ClusterNotFoundException":
2220
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2221
- case "InvalidParameterException":
2222
- case "com.amazonaws.ecs#InvalidParameterException":
2223
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2224
- case "ServerException":
2225
- case "com.amazonaws.ecs#ServerException":
2226
- throw await de_ServerExceptionRes(parsedOutput, context);
2227
- default:
2228
- const parsedBody = parsedOutput.body;
2229
- return throwDefaultError({
2230
- output,
2231
- parsedBody,
2232
- errorCode,
2233
- });
2234
- }
2235
- };
2236
- const de_SubmitAttachmentStateChangesCommand = async (output, context) => {
2237
- if (output.statusCode >= 300) {
2238
- return de_SubmitAttachmentStateChangesCommandError(output, context);
2239
- }
2240
- const data = await parseBody(output.body, context);
2241
- let contents = {};
2242
- contents = (0, smithy_client_1._json)(data);
2243
- const response = {
2244
- $metadata: deserializeMetadata(output),
2245
- ...contents,
2246
- };
2247
- return response;
2248
- };
2249
- exports.de_SubmitAttachmentStateChangesCommand = de_SubmitAttachmentStateChangesCommand;
2250
- const de_SubmitAttachmentStateChangesCommandError = async (output, context) => {
2251
- const parsedOutput = {
2252
- ...output,
2253
- body: await parseErrorBody(output.body, context),
2254
- };
2255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2256
- switch (errorCode) {
2257
- case "AccessDeniedException":
2258
- case "com.amazonaws.ecs#AccessDeniedException":
2259
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2260
- case "ClientException":
2261
- case "com.amazonaws.ecs#ClientException":
2262
- throw await de_ClientExceptionRes(parsedOutput, context);
2263
- case "InvalidParameterException":
2264
- case "com.amazonaws.ecs#InvalidParameterException":
2265
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2266
- case "ServerException":
2267
- case "com.amazonaws.ecs#ServerException":
2268
- throw await de_ServerExceptionRes(parsedOutput, context);
2269
- default:
2270
- const parsedBody = parsedOutput.body;
2271
- return throwDefaultError({
2272
- output,
2273
- parsedBody,
2274
- errorCode,
2275
- });
2276
- }
2277
- };
2278
- const de_SubmitContainerStateChangeCommand = async (output, context) => {
2279
- if (output.statusCode >= 300) {
2280
- return de_SubmitContainerStateChangeCommandError(output, context);
2281
- }
2282
- const data = await parseBody(output.body, context);
2283
- let contents = {};
2284
- contents = (0, smithy_client_1._json)(data);
2285
- const response = {
2286
- $metadata: deserializeMetadata(output),
2287
- ...contents,
2288
- };
2289
- return response;
2290
- };
2291
- exports.de_SubmitContainerStateChangeCommand = de_SubmitContainerStateChangeCommand;
2292
- const de_SubmitContainerStateChangeCommandError = async (output, context) => {
2293
- const parsedOutput = {
2294
- ...output,
2295
- body: await parseErrorBody(output.body, context),
2296
- };
2297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2298
- switch (errorCode) {
2299
- case "AccessDeniedException":
2300
- case "com.amazonaws.ecs#AccessDeniedException":
2301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2302
- case "ClientException":
2303
- case "com.amazonaws.ecs#ClientException":
2304
- throw await de_ClientExceptionRes(parsedOutput, context);
2305
- case "ServerException":
2306
- case "com.amazonaws.ecs#ServerException":
2307
- throw await de_ServerExceptionRes(parsedOutput, context);
2308
- default:
2309
- const parsedBody = parsedOutput.body;
2310
- return throwDefaultError({
2311
- output,
2312
- parsedBody,
2313
- errorCode,
2314
- });
2315
- }
2316
- };
2317
- const de_SubmitTaskStateChangeCommand = async (output, context) => {
2318
- if (output.statusCode >= 300) {
2319
- return de_SubmitTaskStateChangeCommandError(output, context);
2320
- }
2321
- const data = await parseBody(output.body, context);
2322
- let contents = {};
2323
- contents = (0, smithy_client_1._json)(data);
2324
- const response = {
2325
- $metadata: deserializeMetadata(output),
2326
- ...contents,
2327
- };
2328
- return response;
2329
- };
2330
- exports.de_SubmitTaskStateChangeCommand = de_SubmitTaskStateChangeCommand;
2331
- const de_SubmitTaskStateChangeCommandError = async (output, context) => {
2332
- const parsedOutput = {
2333
- ...output,
2334
- body: await parseErrorBody(output.body, context),
2335
- };
2336
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2337
- switch (errorCode) {
2338
- case "AccessDeniedException":
2339
- case "com.amazonaws.ecs#AccessDeniedException":
2340
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2341
- case "ClientException":
2342
- case "com.amazonaws.ecs#ClientException":
2343
- throw await de_ClientExceptionRes(parsedOutput, context);
2344
- case "InvalidParameterException":
2345
- case "com.amazonaws.ecs#InvalidParameterException":
2346
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2347
- case "ServerException":
2348
- case "com.amazonaws.ecs#ServerException":
2349
- throw await de_ServerExceptionRes(parsedOutput, context);
2350
- default:
2351
- const parsedBody = parsedOutput.body;
2352
- return throwDefaultError({
2353
- output,
2354
- parsedBody,
2355
- errorCode,
2356
- });
2357
- }
2358
- };
2359
- const de_TagResourceCommand = async (output, context) => {
2360
- if (output.statusCode >= 300) {
2361
- return de_TagResourceCommandError(output, context);
2362
- }
2363
- const data = await parseBody(output.body, context);
2364
- let contents = {};
2365
- contents = (0, smithy_client_1._json)(data);
2366
- const response = {
2367
- $metadata: deserializeMetadata(output),
2368
- ...contents,
2369
- };
2370
- return response;
2371
- };
2372
- exports.de_TagResourceCommand = de_TagResourceCommand;
2373
- const de_TagResourceCommandError = async (output, context) => {
2374
- const parsedOutput = {
2375
- ...output,
2376
- body: await parseErrorBody(output.body, context),
2377
- };
2378
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2379
- switch (errorCode) {
2380
- case "ClientException":
2381
- case "com.amazonaws.ecs#ClientException":
2382
- throw await de_ClientExceptionRes(parsedOutput, context);
2383
- case "ClusterNotFoundException":
2384
- case "com.amazonaws.ecs#ClusterNotFoundException":
2385
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2386
- case "InvalidParameterException":
2387
- case "com.amazonaws.ecs#InvalidParameterException":
2388
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2389
- case "ResourceNotFoundException":
2390
- case "com.amazonaws.ecs#ResourceNotFoundException":
2391
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2392
- case "ServerException":
2393
- case "com.amazonaws.ecs#ServerException":
2394
- throw await de_ServerExceptionRes(parsedOutput, context);
2395
- default:
2396
- const parsedBody = parsedOutput.body;
2397
- return throwDefaultError({
2398
- output,
2399
- parsedBody,
2400
- errorCode,
2401
- });
2402
- }
2403
- };
2404
- const de_UntagResourceCommand = async (output, context) => {
2405
- if (output.statusCode >= 300) {
2406
- return de_UntagResourceCommandError(output, context);
2407
- }
2408
- const data = await parseBody(output.body, context);
2409
- let contents = {};
2410
- contents = (0, smithy_client_1._json)(data);
2411
- const response = {
2412
- $metadata: deserializeMetadata(output),
2413
- ...contents,
2414
- };
2415
- return response;
2416
- };
2417
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2418
- const de_UntagResourceCommandError = async (output, context) => {
2419
- const parsedOutput = {
2420
- ...output,
2421
- body: await parseErrorBody(output.body, context),
2422
- };
2423
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2424
- switch (errorCode) {
2425
- case "ClientException":
2426
- case "com.amazonaws.ecs#ClientException":
2427
- throw await de_ClientExceptionRes(parsedOutput, context);
2428
- case "ClusterNotFoundException":
2429
- case "com.amazonaws.ecs#ClusterNotFoundException":
2430
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2431
- case "InvalidParameterException":
2432
- case "com.amazonaws.ecs#InvalidParameterException":
2433
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2434
- case "ResourceNotFoundException":
2435
- case "com.amazonaws.ecs#ResourceNotFoundException":
2436
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2437
- case "ServerException":
2438
- case "com.amazonaws.ecs#ServerException":
2439
- throw await de_ServerExceptionRes(parsedOutput, context);
2440
- default:
2441
- const parsedBody = parsedOutput.body;
2442
- return throwDefaultError({
2443
- output,
2444
- parsedBody,
2445
- errorCode,
2446
- });
2447
- }
2448
- };
2449
- const de_UpdateCapacityProviderCommand = async (output, context) => {
2450
- if (output.statusCode >= 300) {
2451
- return de_UpdateCapacityProviderCommandError(output, context);
2452
- }
2453
- const data = await parseBody(output.body, context);
2454
- let contents = {};
2455
- contents = (0, smithy_client_1._json)(data);
2456
- const response = {
2457
- $metadata: deserializeMetadata(output),
2458
- ...contents,
2459
- };
2460
- return response;
2461
- };
2462
- exports.de_UpdateCapacityProviderCommand = de_UpdateCapacityProviderCommand;
2463
- const de_UpdateCapacityProviderCommandError = async (output, context) => {
2464
- const parsedOutput = {
2465
- ...output,
2466
- body: await parseErrorBody(output.body, context),
2467
- };
2468
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2469
- switch (errorCode) {
2470
- case "ClientException":
2471
- case "com.amazonaws.ecs#ClientException":
2472
- throw await de_ClientExceptionRes(parsedOutput, context);
2473
- case "InvalidParameterException":
2474
- case "com.amazonaws.ecs#InvalidParameterException":
2475
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2476
- case "ServerException":
2477
- case "com.amazonaws.ecs#ServerException":
2478
- throw await de_ServerExceptionRes(parsedOutput, context);
2479
- default:
2480
- const parsedBody = parsedOutput.body;
2481
- return throwDefaultError({
2482
- output,
2483
- parsedBody,
2484
- errorCode,
2485
- });
2486
- }
2487
- };
2488
- const de_UpdateClusterCommand = async (output, context) => {
2489
- if (output.statusCode >= 300) {
2490
- return de_UpdateClusterCommandError(output, context);
2491
- }
2492
- const data = await parseBody(output.body, context);
2493
- let contents = {};
2494
- contents = (0, smithy_client_1._json)(data);
2495
- const response = {
2496
- $metadata: deserializeMetadata(output),
2497
- ...contents,
2498
- };
2499
- return response;
2500
- };
2501
- exports.de_UpdateClusterCommand = de_UpdateClusterCommand;
2502
- const de_UpdateClusterCommandError = async (output, context) => {
2503
- const parsedOutput = {
2504
- ...output,
2505
- body: await parseErrorBody(output.body, context),
2506
- };
2507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2508
- switch (errorCode) {
2509
- case "ClientException":
2510
- case "com.amazonaws.ecs#ClientException":
2511
- throw await de_ClientExceptionRes(parsedOutput, context);
2512
- case "ClusterNotFoundException":
2513
- case "com.amazonaws.ecs#ClusterNotFoundException":
2514
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2515
- case "InvalidParameterException":
2516
- case "com.amazonaws.ecs#InvalidParameterException":
2517
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2518
- case "NamespaceNotFoundException":
2519
- case "com.amazonaws.ecs#NamespaceNotFoundException":
2520
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
2521
- case "ServerException":
2522
- case "com.amazonaws.ecs#ServerException":
2523
- throw await de_ServerExceptionRes(parsedOutput, context);
2524
- default:
2525
- const parsedBody = parsedOutput.body;
2526
- return throwDefaultError({
2527
- output,
2528
- parsedBody,
2529
- errorCode,
2530
- });
2531
- }
2532
- };
2533
- const de_UpdateClusterSettingsCommand = async (output, context) => {
2534
- if (output.statusCode >= 300) {
2535
- return de_UpdateClusterSettingsCommandError(output, context);
2536
- }
2537
- const data = await parseBody(output.body, context);
2538
- let contents = {};
2539
- contents = (0, smithy_client_1._json)(data);
2540
- const response = {
2541
- $metadata: deserializeMetadata(output),
2542
- ...contents,
2543
- };
2544
- return response;
2545
- };
2546
- exports.de_UpdateClusterSettingsCommand = de_UpdateClusterSettingsCommand;
2547
- const de_UpdateClusterSettingsCommandError = async (output, context) => {
2548
- const parsedOutput = {
2549
- ...output,
2550
- body: await parseErrorBody(output.body, context),
2551
- };
2552
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2553
- switch (errorCode) {
2554
- case "ClientException":
2555
- case "com.amazonaws.ecs#ClientException":
2556
- throw await de_ClientExceptionRes(parsedOutput, context);
2557
- case "ClusterNotFoundException":
2558
- case "com.amazonaws.ecs#ClusterNotFoundException":
2559
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2560
- case "InvalidParameterException":
2561
- case "com.amazonaws.ecs#InvalidParameterException":
2562
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2563
- case "ServerException":
2564
- case "com.amazonaws.ecs#ServerException":
2565
- throw await de_ServerExceptionRes(parsedOutput, context);
2566
- default:
2567
- const parsedBody = parsedOutput.body;
2568
- return throwDefaultError({
2569
- output,
2570
- parsedBody,
2571
- errorCode,
2572
- });
2573
- }
2574
- };
2575
- const de_UpdateContainerAgentCommand = async (output, context) => {
2576
- if (output.statusCode >= 300) {
2577
- return de_UpdateContainerAgentCommandError(output, context);
2578
- }
2579
- const data = await parseBody(output.body, context);
2580
- let contents = {};
2581
- contents = de_UpdateContainerAgentResponse(data, context);
2582
- const response = {
2583
- $metadata: deserializeMetadata(output),
2584
- ...contents,
2585
- };
2586
- return response;
2587
- };
2588
- exports.de_UpdateContainerAgentCommand = de_UpdateContainerAgentCommand;
2589
- const de_UpdateContainerAgentCommandError = async (output, context) => {
2590
- const parsedOutput = {
2591
- ...output,
2592
- body: await parseErrorBody(output.body, context),
2593
- };
2594
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2595
- switch (errorCode) {
2596
- case "ClientException":
2597
- case "com.amazonaws.ecs#ClientException":
2598
- throw await de_ClientExceptionRes(parsedOutput, context);
2599
- case "ClusterNotFoundException":
2600
- case "com.amazonaws.ecs#ClusterNotFoundException":
2601
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2602
- case "InvalidParameterException":
2603
- case "com.amazonaws.ecs#InvalidParameterException":
2604
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2605
- case "MissingVersionException":
2606
- case "com.amazonaws.ecs#MissingVersionException":
2607
- throw await de_MissingVersionExceptionRes(parsedOutput, context);
2608
- case "NoUpdateAvailableException":
2609
- case "com.amazonaws.ecs#NoUpdateAvailableException":
2610
- throw await de_NoUpdateAvailableExceptionRes(parsedOutput, context);
2611
- case "ServerException":
2612
- case "com.amazonaws.ecs#ServerException":
2613
- throw await de_ServerExceptionRes(parsedOutput, context);
2614
- case "UpdateInProgressException":
2615
- case "com.amazonaws.ecs#UpdateInProgressException":
2616
- throw await de_UpdateInProgressExceptionRes(parsedOutput, context);
2617
- default:
2618
- const parsedBody = parsedOutput.body;
2619
- return throwDefaultError({
2620
- output,
2621
- parsedBody,
2622
- errorCode,
2623
- });
2624
- }
2625
- };
2626
- const de_UpdateContainerInstancesStateCommand = async (output, context) => {
2627
- if (output.statusCode >= 300) {
2628
- return de_UpdateContainerInstancesStateCommandError(output, context);
2629
- }
2630
- const data = await parseBody(output.body, context);
2631
- let contents = {};
2632
- contents = de_UpdateContainerInstancesStateResponse(data, context);
2633
- const response = {
2634
- $metadata: deserializeMetadata(output),
2635
- ...contents,
2636
- };
2637
- return response;
2638
- };
2639
- exports.de_UpdateContainerInstancesStateCommand = de_UpdateContainerInstancesStateCommand;
2640
- const de_UpdateContainerInstancesStateCommandError = async (output, context) => {
2641
- const parsedOutput = {
2642
- ...output,
2643
- body: await parseErrorBody(output.body, context),
2644
- };
2645
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2646
- switch (errorCode) {
2647
- case "ClientException":
2648
- case "com.amazonaws.ecs#ClientException":
2649
- throw await de_ClientExceptionRes(parsedOutput, context);
2650
- case "ClusterNotFoundException":
2651
- case "com.amazonaws.ecs#ClusterNotFoundException":
2652
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2653
- case "InvalidParameterException":
2654
- case "com.amazonaws.ecs#InvalidParameterException":
2655
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2656
- case "ServerException":
2657
- case "com.amazonaws.ecs#ServerException":
2658
- throw await de_ServerExceptionRes(parsedOutput, context);
2659
- default:
2660
- const parsedBody = parsedOutput.body;
2661
- return throwDefaultError({
2662
- output,
2663
- parsedBody,
2664
- errorCode,
2665
- });
2666
- }
2667
- };
2668
- const de_UpdateServiceCommand = async (output, context) => {
2669
- if (output.statusCode >= 300) {
2670
- return de_UpdateServiceCommandError(output, context);
2671
- }
2672
- const data = await parseBody(output.body, context);
2673
- let contents = {};
2674
- contents = de_UpdateServiceResponse(data, context);
2675
- const response = {
2676
- $metadata: deserializeMetadata(output),
2677
- ...contents,
2678
- };
2679
- return response;
2680
- };
2681
- exports.de_UpdateServiceCommand = de_UpdateServiceCommand;
2682
- const de_UpdateServiceCommandError = async (output, context) => {
2683
- const parsedOutput = {
2684
- ...output,
2685
- body: await parseErrorBody(output.body, context),
2686
- };
2687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2688
- switch (errorCode) {
2689
- case "AccessDeniedException":
2690
- case "com.amazonaws.ecs#AccessDeniedException":
2691
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2692
- case "ClientException":
2693
- case "com.amazonaws.ecs#ClientException":
2694
- throw await de_ClientExceptionRes(parsedOutput, context);
2695
- case "ClusterNotFoundException":
2696
- case "com.amazonaws.ecs#ClusterNotFoundException":
2697
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2698
- case "InvalidParameterException":
2699
- case "com.amazonaws.ecs#InvalidParameterException":
2700
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2701
- case "NamespaceNotFoundException":
2702
- case "com.amazonaws.ecs#NamespaceNotFoundException":
2703
- throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context);
2704
- case "PlatformTaskDefinitionIncompatibilityException":
2705
- case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException":
2706
- throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context);
2707
- case "PlatformUnknownException":
2708
- case "com.amazonaws.ecs#PlatformUnknownException":
2709
- throw await de_PlatformUnknownExceptionRes(parsedOutput, context);
2710
- case "ServerException":
2711
- case "com.amazonaws.ecs#ServerException":
2712
- throw await de_ServerExceptionRes(parsedOutput, context);
2713
- case "ServiceNotActiveException":
2714
- case "com.amazonaws.ecs#ServiceNotActiveException":
2715
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
2716
- case "ServiceNotFoundException":
2717
- case "com.amazonaws.ecs#ServiceNotFoundException":
2718
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
2719
- case "UnsupportedFeatureException":
2720
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2721
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2722
- default:
2723
- const parsedBody = parsedOutput.body;
2724
- return throwDefaultError({
2725
- output,
2726
- parsedBody,
2727
- errorCode,
2728
- });
2729
- }
2730
- };
2731
- const de_UpdateServicePrimaryTaskSetCommand = async (output, context) => {
2732
- if (output.statusCode >= 300) {
2733
- return de_UpdateServicePrimaryTaskSetCommandError(output, context);
2734
- }
2735
- const data = await parseBody(output.body, context);
2736
- let contents = {};
2737
- contents = de_UpdateServicePrimaryTaskSetResponse(data, context);
2738
- const response = {
2739
- $metadata: deserializeMetadata(output),
2740
- ...contents,
2741
- };
2742
- return response;
2743
- };
2744
- exports.de_UpdateServicePrimaryTaskSetCommand = de_UpdateServicePrimaryTaskSetCommand;
2745
- const de_UpdateServicePrimaryTaskSetCommandError = async (output, context) => {
2746
- const parsedOutput = {
2747
- ...output,
2748
- body: await parseErrorBody(output.body, context),
2749
- };
2750
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2751
- switch (errorCode) {
2752
- case "AccessDeniedException":
2753
- case "com.amazonaws.ecs#AccessDeniedException":
2754
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2755
- case "ClientException":
2756
- case "com.amazonaws.ecs#ClientException":
2757
- throw await de_ClientExceptionRes(parsedOutput, context);
2758
- case "ClusterNotFoundException":
2759
- case "com.amazonaws.ecs#ClusterNotFoundException":
2760
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2761
- case "InvalidParameterException":
2762
- case "com.amazonaws.ecs#InvalidParameterException":
2763
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2764
- case "ServerException":
2765
- case "com.amazonaws.ecs#ServerException":
2766
- throw await de_ServerExceptionRes(parsedOutput, context);
2767
- case "ServiceNotActiveException":
2768
- case "com.amazonaws.ecs#ServiceNotActiveException":
2769
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
2770
- case "ServiceNotFoundException":
2771
- case "com.amazonaws.ecs#ServiceNotFoundException":
2772
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
2773
- case "TaskSetNotFoundException":
2774
- case "com.amazonaws.ecs#TaskSetNotFoundException":
2775
- throw await de_TaskSetNotFoundExceptionRes(parsedOutput, context);
2776
- case "UnsupportedFeatureException":
2777
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2778
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2779
- default:
2780
- const parsedBody = parsedOutput.body;
2781
- return throwDefaultError({
2782
- output,
2783
- parsedBody,
2784
- errorCode,
2785
- });
2786
- }
2787
- };
2788
- const de_UpdateTaskProtectionCommand = async (output, context) => {
2789
- if (output.statusCode >= 300) {
2790
- return de_UpdateTaskProtectionCommandError(output, context);
2791
- }
2792
- const data = await parseBody(output.body, context);
2793
- let contents = {};
2794
- contents = de_UpdateTaskProtectionResponse(data, context);
2795
- const response = {
2796
- $metadata: deserializeMetadata(output),
2797
- ...contents,
2798
- };
2799
- return response;
2800
- };
2801
- exports.de_UpdateTaskProtectionCommand = de_UpdateTaskProtectionCommand;
2802
- const de_UpdateTaskProtectionCommandError = async (output, context) => {
2803
- const parsedOutput = {
2804
- ...output,
2805
- body: await parseErrorBody(output.body, context),
2806
- };
2807
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2808
- switch (errorCode) {
2809
- case "AccessDeniedException":
2810
- case "com.amazonaws.ecs#AccessDeniedException":
2811
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2812
- case "ClientException":
2813
- case "com.amazonaws.ecs#ClientException":
2814
- throw await de_ClientExceptionRes(parsedOutput, context);
2815
- case "ClusterNotFoundException":
2816
- case "com.amazonaws.ecs#ClusterNotFoundException":
2817
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2818
- case "InvalidParameterException":
2819
- case "com.amazonaws.ecs#InvalidParameterException":
2820
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2821
- case "ResourceNotFoundException":
2822
- case "com.amazonaws.ecs#ResourceNotFoundException":
2823
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2824
- case "ServerException":
2825
- case "com.amazonaws.ecs#ServerException":
2826
- throw await de_ServerExceptionRes(parsedOutput, context);
2827
- case "UnsupportedFeatureException":
2828
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2829
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2830
- default:
2831
- const parsedBody = parsedOutput.body;
2832
- return throwDefaultError({
2833
- output,
2834
- parsedBody,
2835
- errorCode,
2836
- });
2837
- }
2838
- };
2839
- const de_UpdateTaskSetCommand = async (output, context) => {
2840
- if (output.statusCode >= 300) {
2841
- return de_UpdateTaskSetCommandError(output, context);
2842
- }
2843
- const data = await parseBody(output.body, context);
2844
- let contents = {};
2845
- contents = de_UpdateTaskSetResponse(data, context);
2846
- const response = {
2847
- $metadata: deserializeMetadata(output),
2848
- ...contents,
2849
- };
2850
- return response;
2851
- };
2852
- exports.de_UpdateTaskSetCommand = de_UpdateTaskSetCommand;
2853
- const de_UpdateTaskSetCommandError = async (output, context) => {
2854
- const parsedOutput = {
2855
- ...output,
2856
- body: await parseErrorBody(output.body, context),
2857
- };
2858
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2859
- switch (errorCode) {
2860
- case "AccessDeniedException":
2861
- case "com.amazonaws.ecs#AccessDeniedException":
2862
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2863
- case "ClientException":
2864
- case "com.amazonaws.ecs#ClientException":
2865
- throw await de_ClientExceptionRes(parsedOutput, context);
2866
- case "ClusterNotFoundException":
2867
- case "com.amazonaws.ecs#ClusterNotFoundException":
2868
- throw await de_ClusterNotFoundExceptionRes(parsedOutput, context);
2869
- case "InvalidParameterException":
2870
- case "com.amazonaws.ecs#InvalidParameterException":
2871
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2872
- case "ServerException":
2873
- case "com.amazonaws.ecs#ServerException":
2874
- throw await de_ServerExceptionRes(parsedOutput, context);
2875
- case "ServiceNotActiveException":
2876
- case "com.amazonaws.ecs#ServiceNotActiveException":
2877
- throw await de_ServiceNotActiveExceptionRes(parsedOutput, context);
2878
- case "ServiceNotFoundException":
2879
- case "com.amazonaws.ecs#ServiceNotFoundException":
2880
- throw await de_ServiceNotFoundExceptionRes(parsedOutput, context);
2881
- case "TaskSetNotFoundException":
2882
- case "com.amazonaws.ecs#TaskSetNotFoundException":
2883
- throw await de_TaskSetNotFoundExceptionRes(parsedOutput, context);
2884
- case "UnsupportedFeatureException":
2885
- case "com.amazonaws.ecs#UnsupportedFeatureException":
2886
- throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context);
2887
- default:
2888
- const parsedBody = parsedOutput.body;
2889
- return throwDefaultError({
2890
- output,
2891
- parsedBody,
2892
- errorCode,
2893
- });
2894
- }
2895
- };
2896
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2897
- const body = parsedOutput.body;
2898
- const deserialized = (0, smithy_client_1._json)(body);
2899
- const exception = new models_0_1.AccessDeniedException({
2900
- $metadata: deserializeMetadata(parsedOutput),
2901
- ...deserialized,
2902
- });
2903
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2904
- };
2905
- const de_AttributeLimitExceededExceptionRes = async (parsedOutput, context) => {
2906
- const body = parsedOutput.body;
2907
- const deserialized = (0, smithy_client_1._json)(body);
2908
- const exception = new models_0_1.AttributeLimitExceededException({
2909
- $metadata: deserializeMetadata(parsedOutput),
2910
- ...deserialized,
2911
- });
2912
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2913
- };
2914
- const de_BlockedExceptionRes = async (parsedOutput, context) => {
2915
- const body = parsedOutput.body;
2916
- const deserialized = (0, smithy_client_1._json)(body);
2917
- const exception = new models_0_1.BlockedException({
2918
- $metadata: deserializeMetadata(parsedOutput),
2919
- ...deserialized,
2920
- });
2921
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2922
- };
2923
- const de_ClientExceptionRes = async (parsedOutput, context) => {
2924
- const body = parsedOutput.body;
2925
- const deserialized = (0, smithy_client_1._json)(body);
2926
- const exception = new models_0_1.ClientException({
2927
- $metadata: deserializeMetadata(parsedOutput),
2928
- ...deserialized,
2929
- });
2930
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2931
- };
2932
- const de_ClusterContainsContainerInstancesExceptionRes = async (parsedOutput, context) => {
2933
- const body = parsedOutput.body;
2934
- const deserialized = (0, smithy_client_1._json)(body);
2935
- const exception = new models_0_1.ClusterContainsContainerInstancesException({
2936
- $metadata: deserializeMetadata(parsedOutput),
2937
- ...deserialized,
2938
- });
2939
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2940
- };
2941
- const de_ClusterContainsServicesExceptionRes = async (parsedOutput, context) => {
2942
- const body = parsedOutput.body;
2943
- const deserialized = (0, smithy_client_1._json)(body);
2944
- const exception = new models_0_1.ClusterContainsServicesException({
2945
- $metadata: deserializeMetadata(parsedOutput),
2946
- ...deserialized,
2947
- });
2948
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2949
- };
2950
- const de_ClusterContainsTasksExceptionRes = async (parsedOutput, context) => {
2951
- const body = parsedOutput.body;
2952
- const deserialized = (0, smithy_client_1._json)(body);
2953
- const exception = new models_0_1.ClusterContainsTasksException({
2954
- $metadata: deserializeMetadata(parsedOutput),
2955
- ...deserialized,
2956
- });
2957
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2958
- };
2959
- const de_ClusterNotFoundExceptionRes = async (parsedOutput, context) => {
2960
- const body = parsedOutput.body;
2961
- const deserialized = (0, smithy_client_1._json)(body);
2962
- const exception = new models_0_1.ClusterNotFoundException({
2963
- $metadata: deserializeMetadata(parsedOutput),
2964
- ...deserialized,
2965
- });
2966
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2967
- };
2968
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2969
- const body = parsedOutput.body;
2970
- const deserialized = (0, smithy_client_1._json)(body);
2971
- const exception = new models_0_1.ConflictException({
2972
- $metadata: deserializeMetadata(parsedOutput),
2973
- ...deserialized,
2974
- });
2975
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2976
- };
2977
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2978
- const body = parsedOutput.body;
2979
- const deserialized = (0, smithy_client_1._json)(body);
2980
- const exception = new models_0_1.InvalidParameterException({
2981
- $metadata: deserializeMetadata(parsedOutput),
2982
- ...deserialized,
2983
- });
2984
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2985
- };
2986
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2987
- const body = parsedOutput.body;
2988
- const deserialized = (0, smithy_client_1._json)(body);
2989
- const exception = new models_0_1.LimitExceededException({
2990
- $metadata: deserializeMetadata(parsedOutput),
2991
- ...deserialized,
2992
- });
2993
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2994
- };
2995
- const de_MissingVersionExceptionRes = async (parsedOutput, context) => {
2996
- const body = parsedOutput.body;
2997
- const deserialized = (0, smithy_client_1._json)(body);
2998
- const exception = new models_0_1.MissingVersionException({
2999
- $metadata: deserializeMetadata(parsedOutput),
3000
- ...deserialized,
3001
- });
3002
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3003
- };
3004
- const de_NamespaceNotFoundExceptionRes = async (parsedOutput, context) => {
3005
- const body = parsedOutput.body;
3006
- const deserialized = (0, smithy_client_1._json)(body);
3007
- const exception = new models_0_1.NamespaceNotFoundException({
3008
- $metadata: deserializeMetadata(parsedOutput),
3009
- ...deserialized,
3010
- });
3011
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3012
- };
3013
- const de_NoUpdateAvailableExceptionRes = async (parsedOutput, context) => {
3014
- const body = parsedOutput.body;
3015
- const deserialized = (0, smithy_client_1._json)(body);
3016
- const exception = new models_0_1.NoUpdateAvailableException({
3017
- $metadata: deserializeMetadata(parsedOutput),
3018
- ...deserialized,
3019
- });
3020
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3021
- };
3022
- const de_PlatformTaskDefinitionIncompatibilityExceptionRes = async (parsedOutput, context) => {
3023
- const body = parsedOutput.body;
3024
- const deserialized = (0, smithy_client_1._json)(body);
3025
- const exception = new models_0_1.PlatformTaskDefinitionIncompatibilityException({
3026
- $metadata: deserializeMetadata(parsedOutput),
3027
- ...deserialized,
3028
- });
3029
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3030
- };
3031
- const de_PlatformUnknownExceptionRes = async (parsedOutput, context) => {
3032
- const body = parsedOutput.body;
3033
- const deserialized = (0, smithy_client_1._json)(body);
3034
- const exception = new models_0_1.PlatformUnknownException({
3035
- $metadata: deserializeMetadata(parsedOutput),
3036
- ...deserialized,
3037
- });
3038
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3039
- };
3040
- const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
3041
- const body = parsedOutput.body;
3042
- const deserialized = (0, smithy_client_1._json)(body);
3043
- const exception = new models_0_1.ResourceInUseException({
3044
- $metadata: deserializeMetadata(parsedOutput),
3045
- ...deserialized,
3046
- });
3047
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3048
- };
3049
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
3050
- const body = parsedOutput.body;
3051
- const deserialized = (0, smithy_client_1._json)(body);
3052
- const exception = new models_0_1.ResourceNotFoundException({
3053
- $metadata: deserializeMetadata(parsedOutput),
3054
- ...deserialized,
3055
- });
3056
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3057
- };
3058
- const de_ServerExceptionRes = async (parsedOutput, context) => {
3059
- const body = parsedOutput.body;
3060
- const deserialized = (0, smithy_client_1._json)(body);
3061
- const exception = new models_0_1.ServerException({
3062
- $metadata: deserializeMetadata(parsedOutput),
3063
- ...deserialized,
3064
- });
3065
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3066
- };
3067
- const de_ServiceNotActiveExceptionRes = async (parsedOutput, context) => {
3068
- const body = parsedOutput.body;
3069
- const deserialized = (0, smithy_client_1._json)(body);
3070
- const exception = new models_0_1.ServiceNotActiveException({
3071
- $metadata: deserializeMetadata(parsedOutput),
3072
- ...deserialized,
3073
- });
3074
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3075
- };
3076
- const de_ServiceNotFoundExceptionRes = async (parsedOutput, context) => {
3077
- const body = parsedOutput.body;
3078
- const deserialized = (0, smithy_client_1._json)(body);
3079
- const exception = new models_0_1.ServiceNotFoundException({
3080
- $metadata: deserializeMetadata(parsedOutput),
3081
- ...deserialized,
3082
- });
3083
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3084
- };
3085
- const de_TargetNotConnectedExceptionRes = async (parsedOutput, context) => {
3086
- const body = parsedOutput.body;
3087
- const deserialized = (0, smithy_client_1._json)(body);
3088
- const exception = new models_0_1.TargetNotConnectedException({
3089
- $metadata: deserializeMetadata(parsedOutput),
3090
- ...deserialized,
3091
- });
3092
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3093
- };
3094
- const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
3095
- const body = parsedOutput.body;
3096
- const deserialized = (0, smithy_client_1._json)(body);
3097
- const exception = new models_0_1.TargetNotFoundException({
3098
- $metadata: deserializeMetadata(parsedOutput),
3099
- ...deserialized,
3100
- });
3101
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3102
- };
3103
- const de_TaskSetNotFoundExceptionRes = async (parsedOutput, context) => {
3104
- const body = parsedOutput.body;
3105
- const deserialized = (0, smithy_client_1._json)(body);
3106
- const exception = new models_0_1.TaskSetNotFoundException({
3107
- $metadata: deserializeMetadata(parsedOutput),
3108
- ...deserialized,
3109
- });
3110
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3111
- };
3112
- const de_UnsupportedFeatureExceptionRes = async (parsedOutput, context) => {
3113
- const body = parsedOutput.body;
3114
- const deserialized = (0, smithy_client_1._json)(body);
3115
- const exception = new models_0_1.UnsupportedFeatureException({
3116
- $metadata: deserializeMetadata(parsedOutput),
3117
- ...deserialized,
3118
- });
3119
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3120
- };
3121
- const de_UpdateInProgressExceptionRes = async (parsedOutput, context) => {
3122
- const body = parsedOutput.body;
3123
- const deserialized = (0, smithy_client_1._json)(body);
3124
- const exception = new models_0_1.UpdateInProgressException({
3125
- $metadata: deserializeMetadata(parsedOutput),
3126
- ...deserialized,
3127
- });
3128
- return (0, smithy_client_1.decorateServiceException)(exception, body);
3129
- };
3130
- const se_CreateTaskSetRequest = (input, context) => {
3131
- return (0, smithy_client_1.take)(input, {
3132
- capacityProviderStrategy: smithy_client_1._json,
3133
- clientToken: [],
3134
- cluster: [],
3135
- externalId: [],
3136
- launchType: [],
3137
- loadBalancers: smithy_client_1._json,
3138
- networkConfiguration: smithy_client_1._json,
3139
- platformVersion: [],
3140
- scale: (_) => se_Scale(_, context),
3141
- service: [],
3142
- serviceRegistries: smithy_client_1._json,
3143
- tags: smithy_client_1._json,
3144
- taskDefinition: [],
3145
- });
3146
- };
3147
- const se_RegisterContainerInstanceRequest = (input, context) => {
3148
- return (0, smithy_client_1.take)(input, {
3149
- attributes: smithy_client_1._json,
3150
- cluster: [],
3151
- containerInstanceArn: [],
3152
- instanceIdentityDocument: [],
3153
- instanceIdentityDocumentSignature: [],
3154
- platformDevices: smithy_client_1._json,
3155
- tags: smithy_client_1._json,
3156
- totalResources: (_) => se_Resources(_, context),
3157
- versionInfo: smithy_client_1._json,
3158
- });
3159
- };
3160
- const se_Resource = (input, context) => {
3161
- return (0, smithy_client_1.take)(input, {
3162
- doubleValue: smithy_client_1.serializeFloat,
3163
- integerValue: [],
3164
- longValue: [],
3165
- name: [],
3166
- stringSetValue: smithy_client_1._json,
3167
- type: [],
3168
- });
3169
- };
3170
- const se_Resources = (input, context) => {
3171
- return input
3172
- .filter((e) => e != null)
3173
- .map((entry) => {
3174
- return se_Resource(entry, context);
3175
- });
3176
- };
3177
- const se_RunTaskRequest = (input, context) => {
3178
- return (0, smithy_client_1.take)(input, {
3179
- capacityProviderStrategy: smithy_client_1._json,
3180
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
3181
- cluster: [],
3182
- count: [],
3183
- enableECSManagedTags: [],
3184
- enableExecuteCommand: [],
3185
- group: [],
3186
- launchType: [],
3187
- networkConfiguration: smithy_client_1._json,
3188
- overrides: smithy_client_1._json,
3189
- placementConstraints: smithy_client_1._json,
3190
- placementStrategy: smithy_client_1._json,
3191
- platformVersion: [],
3192
- propagateTags: [],
3193
- referenceId: [],
3194
- startedBy: [],
3195
- tags: smithy_client_1._json,
3196
- taskDefinition: [],
3197
- volumeConfigurations: smithy_client_1._json,
3198
- });
3199
- };
3200
- const se_Scale = (input, context) => {
3201
- return (0, smithy_client_1.take)(input, {
3202
- unit: [],
3203
- value: smithy_client_1.serializeFloat,
3204
- });
3205
- };
3206
- const se_SubmitTaskStateChangeRequest = (input, context) => {
3207
- return (0, smithy_client_1.take)(input, {
3208
- attachments: smithy_client_1._json,
3209
- cluster: [],
3210
- containers: smithy_client_1._json,
3211
- executionStoppedAt: (_) => Math.round(_.getTime() / 1000),
3212
- managedAgents: smithy_client_1._json,
3213
- pullStartedAt: (_) => Math.round(_.getTime() / 1000),
3214
- pullStoppedAt: (_) => Math.round(_.getTime() / 1000),
3215
- reason: [],
3216
- status: [],
3217
- task: [],
3218
- });
3219
- };
3220
- const se_UpdateTaskSetRequest = (input, context) => {
3221
- return (0, smithy_client_1.take)(input, {
3222
- cluster: [],
3223
- scale: (_) => se_Scale(_, context),
3224
- service: [],
3225
- taskSet: [],
3226
- });
3227
- };
3228
- const de_Container = (output, context) => {
3229
- return (0, smithy_client_1.take)(output, {
3230
- containerArn: smithy_client_1.expectString,
3231
- cpu: smithy_client_1.expectString,
3232
- exitCode: smithy_client_1.expectInt32,
3233
- gpuIds: smithy_client_1._json,
3234
- healthStatus: smithy_client_1.expectString,
3235
- image: smithy_client_1.expectString,
3236
- imageDigest: smithy_client_1.expectString,
3237
- lastStatus: smithy_client_1.expectString,
3238
- managedAgents: (_) => de_ManagedAgents(_, context),
3239
- memory: smithy_client_1.expectString,
3240
- memoryReservation: smithy_client_1.expectString,
3241
- name: smithy_client_1.expectString,
3242
- networkBindings: smithy_client_1._json,
3243
- networkInterfaces: smithy_client_1._json,
3244
- reason: smithy_client_1.expectString,
3245
- runtimeId: smithy_client_1.expectString,
3246
- taskArn: smithy_client_1.expectString,
3247
- });
3248
- };
3249
- const de_ContainerInstance = (output, context) => {
3250
- return (0, smithy_client_1.take)(output, {
3251
- agentConnected: smithy_client_1.expectBoolean,
3252
- agentUpdateStatus: smithy_client_1.expectString,
3253
- attachments: smithy_client_1._json,
3254
- attributes: smithy_client_1._json,
3255
- capacityProviderName: smithy_client_1.expectString,
3256
- containerInstanceArn: smithy_client_1.expectString,
3257
- ec2InstanceId: smithy_client_1.expectString,
3258
- healthStatus: (_) => de_ContainerInstanceHealthStatus(_, context),
3259
- pendingTasksCount: smithy_client_1.expectInt32,
3260
- registeredAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3261
- registeredResources: (_) => de_Resources(_, context),
3262
- remainingResources: (_) => de_Resources(_, context),
3263
- runningTasksCount: smithy_client_1.expectInt32,
3264
- status: smithy_client_1.expectString,
3265
- statusReason: smithy_client_1.expectString,
3266
- tags: smithy_client_1._json,
3267
- version: smithy_client_1.expectLong,
3268
- versionInfo: smithy_client_1._json,
3269
- });
3270
- };
3271
- const de_ContainerInstanceHealthStatus = (output, context) => {
3272
- return (0, smithy_client_1.take)(output, {
3273
- details: (_) => de_InstanceHealthCheckResultList(_, context),
3274
- overallStatus: smithy_client_1.expectString,
3275
- });
3276
- };
3277
- const de_ContainerInstances = (output, context) => {
3278
- const retVal = (output || [])
3279
- .filter((e) => e != null)
3280
- .map((entry) => {
3281
- return de_ContainerInstance(entry, context);
3282
- });
3283
- return retVal;
3284
- };
3285
- const de_Containers = (output, context) => {
3286
- const retVal = (output || [])
3287
- .filter((e) => e != null)
3288
- .map((entry) => {
3289
- return de_Container(entry, context);
3290
- });
3291
- return retVal;
3292
- };
3293
- const de_CreateServiceResponse = (output, context) => {
3294
- return (0, smithy_client_1.take)(output, {
3295
- service: (_) => de_Service(_, context),
3296
- });
3297
- };
3298
- const de_CreateTaskSetResponse = (output, context) => {
3299
- return (0, smithy_client_1.take)(output, {
3300
- taskSet: (_) => de_TaskSet(_, context),
3301
- });
3302
- };
3303
- const de_DeleteServiceResponse = (output, context) => {
3304
- return (0, smithy_client_1.take)(output, {
3305
- service: (_) => de_Service(_, context),
3306
- });
3307
- };
3308
- const de_DeleteTaskDefinitionsResponse = (output, context) => {
3309
- return (0, smithy_client_1.take)(output, {
3310
- failures: smithy_client_1._json,
3311
- taskDefinitions: (_) => de_TaskDefinitionList(_, context),
3312
- });
3313
- };
3314
- const de_DeleteTaskSetResponse = (output, context) => {
3315
- return (0, smithy_client_1.take)(output, {
3316
- taskSet: (_) => de_TaskSet(_, context),
3317
- });
3318
- };
3319
- const de_Deployment = (output, context) => {
3320
- return (0, smithy_client_1.take)(output, {
3321
- capacityProviderStrategy: smithy_client_1._json,
3322
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3323
- desiredCount: smithy_client_1.expectInt32,
3324
- failedTasks: smithy_client_1.expectInt32,
3325
- id: smithy_client_1.expectString,
3326
- launchType: smithy_client_1.expectString,
3327
- networkConfiguration: smithy_client_1._json,
3328
- pendingCount: smithy_client_1.expectInt32,
3329
- platformFamily: smithy_client_1.expectString,
3330
- platformVersion: smithy_client_1.expectString,
3331
- rolloutState: smithy_client_1.expectString,
3332
- rolloutStateReason: smithy_client_1.expectString,
3333
- runningCount: smithy_client_1.expectInt32,
3334
- serviceConnectConfiguration: smithy_client_1._json,
3335
- serviceConnectResources: smithy_client_1._json,
3336
- status: smithy_client_1.expectString,
3337
- taskDefinition: smithy_client_1.expectString,
3338
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3339
- volumeConfigurations: smithy_client_1._json,
3340
- });
3341
- };
3342
- const de_Deployments = (output, context) => {
3343
- const retVal = (output || [])
3344
- .filter((e) => e != null)
3345
- .map((entry) => {
3346
- return de_Deployment(entry, context);
3347
- });
3348
- return retVal;
3349
- };
3350
- const de_DeregisterContainerInstanceResponse = (output, context) => {
3351
- return (0, smithy_client_1.take)(output, {
3352
- containerInstance: (_) => de_ContainerInstance(_, context),
3353
- });
3354
- };
3355
- const de_DeregisterTaskDefinitionResponse = (output, context) => {
3356
- return (0, smithy_client_1.take)(output, {
3357
- taskDefinition: (_) => de_TaskDefinition(_, context),
3358
- });
3359
- };
3360
- const de_DescribeContainerInstancesResponse = (output, context) => {
3361
- return (0, smithy_client_1.take)(output, {
3362
- containerInstances: (_) => de_ContainerInstances(_, context),
3363
- failures: smithy_client_1._json,
3364
- });
3365
- };
3366
- const de_DescribeServicesResponse = (output, context) => {
3367
- return (0, smithy_client_1.take)(output, {
3368
- failures: smithy_client_1._json,
3369
- services: (_) => de_Services(_, context),
3370
- });
3371
- };
3372
- const de_DescribeTaskDefinitionResponse = (output, context) => {
3373
- return (0, smithy_client_1.take)(output, {
3374
- tags: smithy_client_1._json,
3375
- taskDefinition: (_) => de_TaskDefinition(_, context),
3376
- });
3377
- };
3378
- const de_DescribeTaskSetsResponse = (output, context) => {
3379
- return (0, smithy_client_1.take)(output, {
3380
- failures: smithy_client_1._json,
3381
- taskSets: (_) => de_TaskSets(_, context),
3382
- });
3383
- };
3384
- const de_DescribeTasksResponse = (output, context) => {
3385
- return (0, smithy_client_1.take)(output, {
3386
- failures: smithy_client_1._json,
3387
- tasks: (_) => de_Tasks(_, context),
3388
- });
3389
- };
3390
- const de_GetTaskProtectionResponse = (output, context) => {
3391
- return (0, smithy_client_1.take)(output, {
3392
- failures: smithy_client_1._json,
3393
- protectedTasks: (_) => de_ProtectedTasks(_, context),
3394
- });
3395
- };
3396
- const de_InstanceHealthCheckResult = (output, context) => {
3397
- return (0, smithy_client_1.take)(output, {
3398
- lastStatusChange: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3399
- lastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3400
- status: smithy_client_1.expectString,
3401
- type: smithy_client_1.expectString,
3402
- });
3403
- };
3404
- const de_InstanceHealthCheckResultList = (output, context) => {
3405
- const retVal = (output || [])
3406
- .filter((e) => e != null)
3407
- .map((entry) => {
3408
- return de_InstanceHealthCheckResult(entry, context);
3409
- });
3410
- return retVal;
3411
- };
3412
- const de_ManagedAgent = (output, context) => {
3413
- return (0, smithy_client_1.take)(output, {
3414
- lastStartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3415
- lastStatus: smithy_client_1.expectString,
3416
- name: smithy_client_1.expectString,
3417
- reason: smithy_client_1.expectString,
3418
- });
3419
- };
3420
- const de_ManagedAgents = (output, context) => {
3421
- const retVal = (output || [])
3422
- .filter((e) => e != null)
3423
- .map((entry) => {
3424
- return de_ManagedAgent(entry, context);
3425
- });
3426
- return retVal;
3427
- };
3428
- const de_ProtectedTask = (output, context) => {
3429
- return (0, smithy_client_1.take)(output, {
3430
- expirationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3431
- protectionEnabled: smithy_client_1.expectBoolean,
3432
- taskArn: smithy_client_1.expectString,
3433
- });
3434
- };
3435
- const de_ProtectedTasks = (output, context) => {
3436
- const retVal = (output || [])
3437
- .filter((e) => e != null)
3438
- .map((entry) => {
3439
- return de_ProtectedTask(entry, context);
3440
- });
3441
- return retVal;
3442
- };
3443
- const de_RegisterContainerInstanceResponse = (output, context) => {
3444
- return (0, smithy_client_1.take)(output, {
3445
- containerInstance: (_) => de_ContainerInstance(_, context),
3446
- });
3447
- };
3448
- const de_RegisterTaskDefinitionResponse = (output, context) => {
3449
- return (0, smithy_client_1.take)(output, {
3450
- tags: smithy_client_1._json,
3451
- taskDefinition: (_) => de_TaskDefinition(_, context),
3452
- });
3453
- };
3454
- const de_Resource = (output, context) => {
3455
- return (0, smithy_client_1.take)(output, {
3456
- doubleValue: smithy_client_1.limitedParseDouble,
3457
- integerValue: smithy_client_1.expectInt32,
3458
- longValue: smithy_client_1.expectLong,
3459
- name: smithy_client_1.expectString,
3460
- stringSetValue: smithy_client_1._json,
3461
- type: smithy_client_1.expectString,
3462
- });
3463
- };
3464
- const de_Resources = (output, context) => {
3465
- const retVal = (output || [])
3466
- .filter((e) => e != null)
3467
- .map((entry) => {
3468
- return de_Resource(entry, context);
3469
- });
3470
- return retVal;
3471
- };
3472
- const de_RunTaskResponse = (output, context) => {
3473
- return (0, smithy_client_1.take)(output, {
3474
- failures: smithy_client_1._json,
3475
- tasks: (_) => de_Tasks(_, context),
3476
- });
3477
- };
3478
- const de_Scale = (output, context) => {
3479
- return (0, smithy_client_1.take)(output, {
3480
- unit: smithy_client_1.expectString,
3481
- value: smithy_client_1.limitedParseDouble,
3482
- });
3483
- };
3484
- const de_Service = (output, context) => {
3485
- return (0, smithy_client_1.take)(output, {
3486
- capacityProviderStrategy: smithy_client_1._json,
3487
- clusterArn: smithy_client_1.expectString,
3488
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3489
- createdBy: smithy_client_1.expectString,
3490
- deploymentConfiguration: smithy_client_1._json,
3491
- deploymentController: smithy_client_1._json,
3492
- deployments: (_) => de_Deployments(_, context),
3493
- desiredCount: smithy_client_1.expectInt32,
3494
- enableECSManagedTags: smithy_client_1.expectBoolean,
3495
- enableExecuteCommand: smithy_client_1.expectBoolean,
3496
- events: (_) => de_ServiceEvents(_, context),
3497
- healthCheckGracePeriodSeconds: smithy_client_1.expectInt32,
3498
- launchType: smithy_client_1.expectString,
3499
- loadBalancers: smithy_client_1._json,
3500
- networkConfiguration: smithy_client_1._json,
3501
- pendingCount: smithy_client_1.expectInt32,
3502
- placementConstraints: smithy_client_1._json,
3503
- placementStrategy: smithy_client_1._json,
3504
- platformFamily: smithy_client_1.expectString,
3505
- platformVersion: smithy_client_1.expectString,
3506
- propagateTags: smithy_client_1.expectString,
3507
- roleArn: smithy_client_1.expectString,
3508
- runningCount: smithy_client_1.expectInt32,
3509
- schedulingStrategy: smithy_client_1.expectString,
3510
- serviceArn: smithy_client_1.expectString,
3511
- serviceName: smithy_client_1.expectString,
3512
- serviceRegistries: smithy_client_1._json,
3513
- status: smithy_client_1.expectString,
3514
- tags: smithy_client_1._json,
3515
- taskDefinition: smithy_client_1.expectString,
3516
- taskSets: (_) => de_TaskSets(_, context),
3517
- });
3518
- };
3519
- const de_ServiceEvent = (output, context) => {
3520
- return (0, smithy_client_1.take)(output, {
3521
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3522
- id: smithy_client_1.expectString,
3523
- message: smithy_client_1.expectString,
3524
- });
3525
- };
3526
- const de_ServiceEvents = (output, context) => {
3527
- const retVal = (output || [])
3528
- .filter((e) => e != null)
3529
- .map((entry) => {
3530
- return de_ServiceEvent(entry, context);
3531
- });
3532
- return retVal;
3533
- };
3534
- const de_Services = (output, context) => {
3535
- const retVal = (output || [])
3536
- .filter((e) => e != null)
3537
- .map((entry) => {
3538
- return de_Service(entry, context);
3539
- });
3540
- return retVal;
3541
- };
3542
- const de_StartTaskResponse = (output, context) => {
3543
- return (0, smithy_client_1.take)(output, {
3544
- failures: smithy_client_1._json,
3545
- tasks: (_) => de_Tasks(_, context),
3546
- });
3547
- };
3548
- const de_StopTaskResponse = (output, context) => {
3549
- return (0, smithy_client_1.take)(output, {
3550
- task: (_) => de_Task(_, context),
3551
- });
3552
- };
3553
- const de_Task = (output, context) => {
3554
- return (0, smithy_client_1.take)(output, {
3555
- attachments: smithy_client_1._json,
3556
- attributes: smithy_client_1._json,
3557
- availabilityZone: smithy_client_1.expectString,
3558
- capacityProviderName: smithy_client_1.expectString,
3559
- clusterArn: smithy_client_1.expectString,
3560
- connectivity: smithy_client_1.expectString,
3561
- connectivityAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3562
- containerInstanceArn: smithy_client_1.expectString,
3563
- containers: (_) => de_Containers(_, context),
3564
- cpu: smithy_client_1.expectString,
3565
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3566
- desiredStatus: smithy_client_1.expectString,
3567
- enableExecuteCommand: smithy_client_1.expectBoolean,
3568
- ephemeralStorage: smithy_client_1._json,
3569
- executionStoppedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3570
- group: smithy_client_1.expectString,
3571
- healthStatus: smithy_client_1.expectString,
3572
- inferenceAccelerators: smithy_client_1._json,
3573
- lastStatus: smithy_client_1.expectString,
3574
- launchType: smithy_client_1.expectString,
3575
- memory: smithy_client_1.expectString,
3576
- overrides: smithy_client_1._json,
3577
- platformFamily: smithy_client_1.expectString,
3578
- platformVersion: smithy_client_1.expectString,
3579
- pullStartedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3580
- pullStoppedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3581
- startedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3582
- startedBy: smithy_client_1.expectString,
3583
- stopCode: smithy_client_1.expectString,
3584
- stoppedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3585
- stoppedReason: smithy_client_1.expectString,
3586
- stoppingAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3587
- tags: smithy_client_1._json,
3588
- taskArn: smithy_client_1.expectString,
3589
- taskDefinitionArn: smithy_client_1.expectString,
3590
- version: smithy_client_1.expectLong,
3591
- });
3592
- };
3593
- const de_TaskDefinition = (output, context) => {
3594
- return (0, smithy_client_1.take)(output, {
3595
- compatibilities: smithy_client_1._json,
3596
- containerDefinitions: smithy_client_1._json,
3597
- cpu: smithy_client_1.expectString,
3598
- deregisteredAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3599
- ephemeralStorage: smithy_client_1._json,
3600
- executionRoleArn: smithy_client_1.expectString,
3601
- family: smithy_client_1.expectString,
3602
- inferenceAccelerators: smithy_client_1._json,
3603
- ipcMode: smithy_client_1.expectString,
3604
- memory: smithy_client_1.expectString,
3605
- networkMode: smithy_client_1.expectString,
3606
- pidMode: smithy_client_1.expectString,
3607
- placementConstraints: smithy_client_1._json,
3608
- proxyConfiguration: smithy_client_1._json,
3609
- registeredAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3610
- registeredBy: smithy_client_1.expectString,
3611
- requiresAttributes: smithy_client_1._json,
3612
- requiresCompatibilities: smithy_client_1._json,
3613
- revision: smithy_client_1.expectInt32,
3614
- runtimePlatform: smithy_client_1._json,
3615
- status: smithy_client_1.expectString,
3616
- taskDefinitionArn: smithy_client_1.expectString,
3617
- taskRoleArn: smithy_client_1.expectString,
3618
- volumes: smithy_client_1._json,
3619
- });
3620
- };
3621
- const de_TaskDefinitionList = (output, context) => {
3622
- const retVal = (output || [])
3623
- .filter((e) => e != null)
3624
- .map((entry) => {
3625
- return de_TaskDefinition(entry, context);
3626
- });
3627
- return retVal;
3628
- };
3629
- const de_Tasks = (output, context) => {
3630
- const retVal = (output || [])
3631
- .filter((e) => e != null)
3632
- .map((entry) => {
3633
- return de_Task(entry, context);
3634
- });
3635
- return retVal;
3636
- };
3637
- const de_TaskSet = (output, context) => {
3638
- return (0, smithy_client_1.take)(output, {
3639
- capacityProviderStrategy: smithy_client_1._json,
3640
- clusterArn: smithy_client_1.expectString,
3641
- computedDesiredCount: smithy_client_1.expectInt32,
3642
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3643
- externalId: smithy_client_1.expectString,
3644
- id: smithy_client_1.expectString,
3645
- launchType: smithy_client_1.expectString,
3646
- loadBalancers: smithy_client_1._json,
3647
- networkConfiguration: smithy_client_1._json,
3648
- pendingCount: smithy_client_1.expectInt32,
3649
- platformFamily: smithy_client_1.expectString,
3650
- platformVersion: smithy_client_1.expectString,
3651
- runningCount: smithy_client_1.expectInt32,
3652
- scale: (_) => de_Scale(_, context),
3653
- serviceArn: smithy_client_1.expectString,
3654
- serviceRegistries: smithy_client_1._json,
3655
- stabilityStatus: smithy_client_1.expectString,
3656
- stabilityStatusAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3657
- startedBy: smithy_client_1.expectString,
3658
- status: smithy_client_1.expectString,
3659
- tags: smithy_client_1._json,
3660
- taskDefinition: smithy_client_1.expectString,
3661
- taskSetArn: smithy_client_1.expectString,
3662
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3663
- });
3664
- };
3665
- const de_TaskSets = (output, context) => {
3666
- const retVal = (output || [])
3667
- .filter((e) => e != null)
3668
- .map((entry) => {
3669
- return de_TaskSet(entry, context);
3670
- });
3671
- return retVal;
3672
- };
3673
- const de_UpdateContainerAgentResponse = (output, context) => {
3674
- return (0, smithy_client_1.take)(output, {
3675
- containerInstance: (_) => de_ContainerInstance(_, context),
3676
- });
3677
- };
3678
- const de_UpdateContainerInstancesStateResponse = (output, context) => {
3679
- return (0, smithy_client_1.take)(output, {
3680
- containerInstances: (_) => de_ContainerInstances(_, context),
3681
- failures: smithy_client_1._json,
3682
- });
3683
- };
3684
- const de_UpdateServicePrimaryTaskSetResponse = (output, context) => {
3685
- return (0, smithy_client_1.take)(output, {
3686
- taskSet: (_) => de_TaskSet(_, context),
3687
- });
3688
- };
3689
- const de_UpdateServiceResponse = (output, context) => {
3690
- return (0, smithy_client_1.take)(output, {
3691
- service: (_) => de_Service(_, context),
3692
- });
3693
- };
3694
- const de_UpdateTaskProtectionResponse = (output, context) => {
3695
- return (0, smithy_client_1.take)(output, {
3696
- failures: smithy_client_1._json,
3697
- protectedTasks: (_) => de_ProtectedTasks(_, context),
3698
- });
3699
- };
3700
- const de_UpdateTaskSetResponse = (output, context) => {
3701
- return (0, smithy_client_1.take)(output, {
3702
- taskSet: (_) => de_TaskSet(_, context),
3703
- });
3704
- };
3705
- const deserializeMetadata = (output) => ({
3706
- httpStatusCode: output.statusCode,
3707
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3708
- extendedRequestId: output.headers["x-amz-id-2"],
3709
- cfId: output.headers["x-amz-cf-id"],
3710
- });
3711
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
3712
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ECSServiceException_1.ECSServiceException);
3713
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
3714
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3715
- const contents = {
3716
- protocol,
3717
- hostname,
3718
- port,
3719
- method: "POST",
3720
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3721
- headers,
3722
- };
3723
- if (resolvedHostname !== undefined) {
3724
- contents.hostname = resolvedHostname;
3725
- }
3726
- if (body !== undefined) {
3727
- contents.body = body;
3728
- }
3729
- return new protocol_http_1.HttpRequest(contents);
3730
- };
3731
- function sharedHeaders(operation) {
3732
- return {
3733
- "content-type": "application/x-amz-json-1.1",
3734
- "x-amz-target": `AmazonEC2ContainerServiceV20141113.${operation}`,
3735
- };
3736
- }
3737
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3738
- if (encoded.length) {
3739
- return JSON.parse(encoded);
3740
- }
3741
- return {};
3742
- });
3743
- const parseErrorBody = async (errorBody, context) => {
3744
- const value = await parseBody(errorBody, context);
3745
- value.message = value.message ?? value.Message;
3746
- return value;
3747
- };
3748
- const loadRestJsonErrorCode = (output, data) => {
3749
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3750
- const sanitizeErrorCode = (rawValue) => {
3751
- let cleanValue = rawValue;
3752
- if (typeof cleanValue === "number") {
3753
- cleanValue = cleanValue.toString();
3754
- }
3755
- if (cleanValue.indexOf(",") >= 0) {
3756
- cleanValue = cleanValue.split(",")[0];
3757
- }
3758
- if (cleanValue.indexOf(":") >= 0) {
3759
- cleanValue = cleanValue.split(":")[0];
3760
- }
3761
- if (cleanValue.indexOf("#") >= 0) {
3762
- cleanValue = cleanValue.split("#")[1];
3763
- }
3764
- return cleanValue;
3765
- };
3766
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3767
- if (headerKey !== undefined) {
3768
- return sanitizeErrorCode(output.headers[headerKey]);
3769
- }
3770
- if (data.code !== undefined) {
3771
- return sanitizeErrorCode(data.code);
3772
- }
3773
- if (data["__type"] !== undefined) {
3774
- return sanitizeErrorCode(data["__type"]);
3775
- }
3776
- };
1
+ module.exports = require("../index.js");