@aws-sdk/client-greengrassv2 3.490.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/GreengrassV2.js +1 -69
- package/dist-cjs/GreengrassV2Client.js +1 -43
- package/dist-cjs/commands/AssociateServiceRoleToAccountCommand.js +1 -28
- package/dist-cjs/commands/BatchAssociateClientDeviceWithCoreDeviceCommand.js +1 -28
- package/dist-cjs/commands/BatchDisassociateClientDeviceFromCoreDeviceCommand.js +1 -28
- package/dist-cjs/commands/CancelDeploymentCommand.js +1 -28
- package/dist-cjs/commands/CreateComponentVersionCommand.js +1 -28
- package/dist-cjs/commands/CreateDeploymentCommand.js +1 -28
- package/dist-cjs/commands/DeleteComponentCommand.js +1 -28
- package/dist-cjs/commands/DeleteCoreDeviceCommand.js +1 -28
- package/dist-cjs/commands/DeleteDeploymentCommand.js +1 -28
- package/dist-cjs/commands/DescribeComponentCommand.js +1 -28
- package/dist-cjs/commands/DisassociateServiceRoleFromAccountCommand.js +1 -28
- package/dist-cjs/commands/GetComponentCommand.js +1 -28
- package/dist-cjs/commands/GetComponentVersionArtifactCommand.js +1 -28
- package/dist-cjs/commands/GetConnectivityInfoCommand.js +1 -28
- package/dist-cjs/commands/GetCoreDeviceCommand.js +1 -28
- package/dist-cjs/commands/GetDeploymentCommand.js +1 -28
- package/dist-cjs/commands/GetServiceRoleForAccountCommand.js +1 -28
- package/dist-cjs/commands/ListClientDevicesAssociatedWithCoreDeviceCommand.js +1 -28
- package/dist-cjs/commands/ListComponentVersionsCommand.js +1 -28
- package/dist-cjs/commands/ListComponentsCommand.js +1 -28
- package/dist-cjs/commands/ListCoreDevicesCommand.js +1 -28
- package/dist-cjs/commands/ListDeploymentsCommand.js +1 -28
- package/dist-cjs/commands/ListEffectiveDeploymentsCommand.js +1 -28
- package/dist-cjs/commands/ListInstalledComponentsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ResolveComponentCandidatesCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateConnectivityInfoCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -32
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3210 -11
- package/dist-cjs/models/GreengrassV2ServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -224
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListClientDevicesAssociatedWithCoreDevicePaginator.js +1 -7
- package/dist-cjs/pagination/ListComponentVersionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListComponentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListCoreDevicesPaginator.js +1 -7
- package/dist-cjs/pagination/ListDeploymentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListEffectiveDeploymentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListInstalledComponentsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -11
- package/dist-cjs/protocols/Aws_restJson1.js +1 -2195
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,2195 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListCoreDevicesCommand = exports.de_ListComponentVersionsCommand = exports.de_ListComponentsCommand = exports.de_ListClientDevicesAssociatedWithCoreDeviceCommand = exports.de_GetServiceRoleForAccountCommand = exports.de_GetDeploymentCommand = exports.de_GetCoreDeviceCommand = exports.de_GetConnectivityInfoCommand = exports.de_GetComponentVersionArtifactCommand = exports.de_GetComponentCommand = exports.de_DisassociateServiceRoleFromAccountCommand = exports.de_DescribeComponentCommand = exports.de_DeleteDeploymentCommand = exports.de_DeleteCoreDeviceCommand = exports.de_DeleteComponentCommand = exports.de_CreateDeploymentCommand = exports.de_CreateComponentVersionCommand = exports.de_CancelDeploymentCommand = exports.de_BatchDisassociateClientDeviceFromCoreDeviceCommand = exports.de_BatchAssociateClientDeviceWithCoreDeviceCommand = exports.de_AssociateServiceRoleToAccountCommand = exports.se_UpdateConnectivityInfoCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResolveComponentCandidatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListInstalledComponentsCommand = exports.se_ListEffectiveDeploymentsCommand = exports.se_ListDeploymentsCommand = exports.se_ListCoreDevicesCommand = exports.se_ListComponentVersionsCommand = exports.se_ListComponentsCommand = exports.se_ListClientDevicesAssociatedWithCoreDeviceCommand = exports.se_GetServiceRoleForAccountCommand = exports.se_GetDeploymentCommand = exports.se_GetCoreDeviceCommand = exports.se_GetConnectivityInfoCommand = exports.se_GetComponentVersionArtifactCommand = exports.se_GetComponentCommand = exports.se_DisassociateServiceRoleFromAccountCommand = exports.se_DescribeComponentCommand = exports.se_DeleteDeploymentCommand = exports.se_DeleteCoreDeviceCommand = exports.se_DeleteComponentCommand = exports.se_CreateDeploymentCommand = exports.se_CreateComponentVersionCommand = exports.se_CancelDeploymentCommand = exports.se_BatchDisassociateClientDeviceFromCoreDeviceCommand = exports.se_BatchAssociateClientDeviceWithCoreDeviceCommand = exports.se_AssociateServiceRoleToAccountCommand = void 0;
|
|
4
|
-
exports.de_UpdateConnectivityInfoCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResolveComponentCandidatesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListInstalledComponentsCommand = exports.de_ListEffectiveDeploymentsCommand = exports.de_ListDeploymentsCommand = void 0;
|
|
5
|
-
const core_1 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const GreengrassV2ServiceException_1 = require("../models/GreengrassV2ServiceException");
|
|
9
|
-
const models_0_1 = require("../models/models_0");
|
|
10
|
-
const se_AssociateServiceRoleToAccountCommand = async (input, context) => {
|
|
11
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
12
|
-
const headers = {
|
|
13
|
-
"content-type": "application/json",
|
|
14
|
-
};
|
|
15
|
-
b.bp("/greengrass/servicerole");
|
|
16
|
-
let body;
|
|
17
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
|
-
RoleArn: [, , `roleArn`],
|
|
19
|
-
}));
|
|
20
|
-
b.m("PUT").h(headers).b(body);
|
|
21
|
-
return b.build();
|
|
22
|
-
};
|
|
23
|
-
exports.se_AssociateServiceRoleToAccountCommand = se_AssociateServiceRoleToAccountCommand;
|
|
24
|
-
const se_BatchAssociateClientDeviceWithCoreDeviceCommand = async (input, context) => {
|
|
25
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
26
|
-
const headers = {
|
|
27
|
-
"content-type": "application/json",
|
|
28
|
-
};
|
|
29
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices");
|
|
30
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
33
|
-
entries: (_) => (0, smithy_client_1._json)(_),
|
|
34
|
-
}));
|
|
35
|
-
b.m("POST").h(headers).b(body);
|
|
36
|
-
return b.build();
|
|
37
|
-
};
|
|
38
|
-
exports.se_BatchAssociateClientDeviceWithCoreDeviceCommand = se_BatchAssociateClientDeviceWithCoreDeviceCommand;
|
|
39
|
-
const se_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (input, context) => {
|
|
40
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
41
|
-
const headers = {
|
|
42
|
-
"content-type": "application/json",
|
|
43
|
-
};
|
|
44
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices");
|
|
45
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
48
|
-
entries: (_) => (0, smithy_client_1._json)(_),
|
|
49
|
-
}));
|
|
50
|
-
b.m("POST").h(headers).b(body);
|
|
51
|
-
return b.build();
|
|
52
|
-
};
|
|
53
|
-
exports.se_BatchDisassociateClientDeviceFromCoreDeviceCommand = se_BatchDisassociateClientDeviceFromCoreDeviceCommand;
|
|
54
|
-
const se_CancelDeploymentCommand = async (input, context) => {
|
|
55
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
56
|
-
const headers = {};
|
|
57
|
-
b.bp("/greengrass/v2/deployments/{deploymentId}/cancel");
|
|
58
|
-
b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
|
|
59
|
-
let body;
|
|
60
|
-
b.m("POST").h(headers).b(body);
|
|
61
|
-
return b.build();
|
|
62
|
-
};
|
|
63
|
-
exports.se_CancelDeploymentCommand = se_CancelDeploymentCommand;
|
|
64
|
-
const se_CreateComponentVersionCommand = async (input, context) => {
|
|
65
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
66
|
-
const headers = {
|
|
67
|
-
"content-type": "application/json",
|
|
68
|
-
};
|
|
69
|
-
b.bp("/greengrass/v2/createComponentVersion");
|
|
70
|
-
let body;
|
|
71
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
72
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
73
|
-
inlineRecipe: (_) => context.base64Encoder(_),
|
|
74
|
-
lambdaFunction: (_) => (0, smithy_client_1._json)(_),
|
|
75
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
76
|
-
}));
|
|
77
|
-
b.m("POST").h(headers).b(body);
|
|
78
|
-
return b.build();
|
|
79
|
-
};
|
|
80
|
-
exports.se_CreateComponentVersionCommand = se_CreateComponentVersionCommand;
|
|
81
|
-
const se_CreateDeploymentCommand = async (input, context) => {
|
|
82
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
83
|
-
const headers = {
|
|
84
|
-
"content-type": "application/json",
|
|
85
|
-
};
|
|
86
|
-
b.bp("/greengrass/v2/deployments");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
89
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
90
|
-
components: (_) => se_ComponentDeploymentSpecifications(_, context),
|
|
91
|
-
deploymentName: [],
|
|
92
|
-
deploymentPolicies: (_) => (0, smithy_client_1._json)(_),
|
|
93
|
-
iotJobConfiguration: (_) => se_DeploymentIoTJobConfiguration(_, context),
|
|
94
|
-
parentTargetArn: [],
|
|
95
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
96
|
-
targetArn: [],
|
|
97
|
-
}));
|
|
98
|
-
b.m("POST").h(headers).b(body);
|
|
99
|
-
return b.build();
|
|
100
|
-
};
|
|
101
|
-
exports.se_CreateDeploymentCommand = se_CreateDeploymentCommand;
|
|
102
|
-
const se_DeleteComponentCommand = async (input, context) => {
|
|
103
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
104
|
-
const headers = {};
|
|
105
|
-
b.bp("/greengrass/v2/components/{arn}");
|
|
106
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
107
|
-
let body;
|
|
108
|
-
b.m("DELETE").h(headers).b(body);
|
|
109
|
-
return b.build();
|
|
110
|
-
};
|
|
111
|
-
exports.se_DeleteComponentCommand = se_DeleteComponentCommand;
|
|
112
|
-
const se_DeleteCoreDeviceCommand = async (input, context) => {
|
|
113
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
114
|
-
const headers = {};
|
|
115
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
|
|
116
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
117
|
-
let body;
|
|
118
|
-
b.m("DELETE").h(headers).b(body);
|
|
119
|
-
return b.build();
|
|
120
|
-
};
|
|
121
|
-
exports.se_DeleteCoreDeviceCommand = se_DeleteCoreDeviceCommand;
|
|
122
|
-
const se_DeleteDeploymentCommand = async (input, context) => {
|
|
123
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
124
|
-
const headers = {};
|
|
125
|
-
b.bp("/greengrass/v2/deployments/{deploymentId}");
|
|
126
|
-
b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
|
|
127
|
-
let body;
|
|
128
|
-
b.m("DELETE").h(headers).b(body);
|
|
129
|
-
return b.build();
|
|
130
|
-
};
|
|
131
|
-
exports.se_DeleteDeploymentCommand = se_DeleteDeploymentCommand;
|
|
132
|
-
const se_DescribeComponentCommand = async (input, context) => {
|
|
133
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
134
|
-
const headers = {};
|
|
135
|
-
b.bp("/greengrass/v2/components/{arn}/metadata");
|
|
136
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
137
|
-
let body;
|
|
138
|
-
b.m("GET").h(headers).b(body);
|
|
139
|
-
return b.build();
|
|
140
|
-
};
|
|
141
|
-
exports.se_DescribeComponentCommand = se_DescribeComponentCommand;
|
|
142
|
-
const se_DisassociateServiceRoleFromAccountCommand = async (input, context) => {
|
|
143
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
144
|
-
const headers = {
|
|
145
|
-
"content-type": "application/json",
|
|
146
|
-
};
|
|
147
|
-
b.bp("/greengrass/servicerole");
|
|
148
|
-
let body;
|
|
149
|
-
body = "";
|
|
150
|
-
b.m("DELETE").h(headers).b(body);
|
|
151
|
-
return b.build();
|
|
152
|
-
};
|
|
153
|
-
exports.se_DisassociateServiceRoleFromAccountCommand = se_DisassociateServiceRoleFromAccountCommand;
|
|
154
|
-
const se_GetComponentCommand = async (input, context) => {
|
|
155
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
156
|
-
const headers = {};
|
|
157
|
-
b.bp("/greengrass/v2/components/{arn}");
|
|
158
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
159
|
-
const query = (0, smithy_client_1.map)({
|
|
160
|
-
[_rOF]: [, input[_rOF]],
|
|
161
|
-
});
|
|
162
|
-
let body;
|
|
163
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
164
|
-
return b.build();
|
|
165
|
-
};
|
|
166
|
-
exports.se_GetComponentCommand = se_GetComponentCommand;
|
|
167
|
-
const se_GetComponentVersionArtifactCommand = async (input, context) => {
|
|
168
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
169
|
-
const headers = {};
|
|
170
|
-
b.bp("/greengrass/v2/components/{arn}/artifacts/{artifactName+}");
|
|
171
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
172
|
-
b.p("artifactName", () => input.artifactName, "{artifactName+}", true);
|
|
173
|
-
let body;
|
|
174
|
-
b.m("GET").h(headers).b(body);
|
|
175
|
-
return b.build();
|
|
176
|
-
};
|
|
177
|
-
exports.se_GetComponentVersionArtifactCommand = se_GetComponentVersionArtifactCommand;
|
|
178
|
-
const se_GetConnectivityInfoCommand = async (input, context) => {
|
|
179
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
180
|
-
const headers = {};
|
|
181
|
-
b.bp("/greengrass/things/{thingName}/connectivityInfo");
|
|
182
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
183
|
-
let body;
|
|
184
|
-
b.m("GET").h(headers).b(body);
|
|
185
|
-
return b.build();
|
|
186
|
-
};
|
|
187
|
-
exports.se_GetConnectivityInfoCommand = se_GetConnectivityInfoCommand;
|
|
188
|
-
const se_GetCoreDeviceCommand = async (input, context) => {
|
|
189
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
190
|
-
const headers = {};
|
|
191
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}");
|
|
192
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
193
|
-
let body;
|
|
194
|
-
b.m("GET").h(headers).b(body);
|
|
195
|
-
return b.build();
|
|
196
|
-
};
|
|
197
|
-
exports.se_GetCoreDeviceCommand = se_GetCoreDeviceCommand;
|
|
198
|
-
const se_GetDeploymentCommand = async (input, context) => {
|
|
199
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
200
|
-
const headers = {};
|
|
201
|
-
b.bp("/greengrass/v2/deployments/{deploymentId}");
|
|
202
|
-
b.p("deploymentId", () => input.deploymentId, "{deploymentId}", false);
|
|
203
|
-
let body;
|
|
204
|
-
b.m("GET").h(headers).b(body);
|
|
205
|
-
return b.build();
|
|
206
|
-
};
|
|
207
|
-
exports.se_GetDeploymentCommand = se_GetDeploymentCommand;
|
|
208
|
-
const se_GetServiceRoleForAccountCommand = async (input, context) => {
|
|
209
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
210
|
-
const headers = {
|
|
211
|
-
"content-type": "application/json",
|
|
212
|
-
};
|
|
213
|
-
b.bp("/greengrass/servicerole");
|
|
214
|
-
let body;
|
|
215
|
-
body = "";
|
|
216
|
-
b.m("GET").h(headers).b(body);
|
|
217
|
-
return b.build();
|
|
218
|
-
};
|
|
219
|
-
exports.se_GetServiceRoleForAccountCommand = se_GetServiceRoleForAccountCommand;
|
|
220
|
-
const se_ListClientDevicesAssociatedWithCoreDeviceCommand = async (input, context) => {
|
|
221
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
222
|
-
const headers = {};
|
|
223
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices");
|
|
224
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
225
|
-
const query = (0, smithy_client_1.map)({
|
|
226
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
227
|
-
[_nT]: [, input[_nT]],
|
|
228
|
-
});
|
|
229
|
-
let body;
|
|
230
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
231
|
-
return b.build();
|
|
232
|
-
};
|
|
233
|
-
exports.se_ListClientDevicesAssociatedWithCoreDeviceCommand = se_ListClientDevicesAssociatedWithCoreDeviceCommand;
|
|
234
|
-
const se_ListComponentsCommand = async (input, context) => {
|
|
235
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
236
|
-
const headers = {};
|
|
237
|
-
b.bp("/greengrass/v2/components");
|
|
238
|
-
const query = (0, smithy_client_1.map)({
|
|
239
|
-
[_s]: [, input[_s]],
|
|
240
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
241
|
-
[_nT]: [, input[_nT]],
|
|
242
|
-
});
|
|
243
|
-
let body;
|
|
244
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
245
|
-
return b.build();
|
|
246
|
-
};
|
|
247
|
-
exports.se_ListComponentsCommand = se_ListComponentsCommand;
|
|
248
|
-
const se_ListComponentVersionsCommand = async (input, context) => {
|
|
249
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
250
|
-
const headers = {};
|
|
251
|
-
b.bp("/greengrass/v2/components/{arn}/versions");
|
|
252
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
253
|
-
const query = (0, smithy_client_1.map)({
|
|
254
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
255
|
-
[_nT]: [, input[_nT]],
|
|
256
|
-
});
|
|
257
|
-
let body;
|
|
258
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
259
|
-
return b.build();
|
|
260
|
-
};
|
|
261
|
-
exports.se_ListComponentVersionsCommand = se_ListComponentVersionsCommand;
|
|
262
|
-
const se_ListCoreDevicesCommand = async (input, context) => {
|
|
263
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
264
|
-
const headers = {};
|
|
265
|
-
b.bp("/greengrass/v2/coreDevices");
|
|
266
|
-
const query = (0, smithy_client_1.map)({
|
|
267
|
-
[_tGA]: [, input[_tGA]],
|
|
268
|
-
[_st]: [, input[_st]],
|
|
269
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
270
|
-
[_nT]: [, input[_nT]],
|
|
271
|
-
});
|
|
272
|
-
let body;
|
|
273
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
274
|
-
return b.build();
|
|
275
|
-
};
|
|
276
|
-
exports.se_ListCoreDevicesCommand = se_ListCoreDevicesCommand;
|
|
277
|
-
const se_ListDeploymentsCommand = async (input, context) => {
|
|
278
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
279
|
-
const headers = {};
|
|
280
|
-
b.bp("/greengrass/v2/deployments");
|
|
281
|
-
const query = (0, smithy_client_1.map)({
|
|
282
|
-
[_tA]: [, input[_tA]],
|
|
283
|
-
[_hF]: [, input[_hF]],
|
|
284
|
-
[_pTA]: [, input[_pTA]],
|
|
285
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
286
|
-
[_nT]: [, input[_nT]],
|
|
287
|
-
});
|
|
288
|
-
let body;
|
|
289
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
290
|
-
return b.build();
|
|
291
|
-
};
|
|
292
|
-
exports.se_ListDeploymentsCommand = se_ListDeploymentsCommand;
|
|
293
|
-
const se_ListEffectiveDeploymentsCommand = async (input, context) => {
|
|
294
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
295
|
-
const headers = {};
|
|
296
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments");
|
|
297
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
298
|
-
const query = (0, smithy_client_1.map)({
|
|
299
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
300
|
-
[_nT]: [, input[_nT]],
|
|
301
|
-
});
|
|
302
|
-
let body;
|
|
303
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
304
|
-
return b.build();
|
|
305
|
-
};
|
|
306
|
-
exports.se_ListEffectiveDeploymentsCommand = se_ListEffectiveDeploymentsCommand;
|
|
307
|
-
const se_ListInstalledComponentsCommand = async (input, context) => {
|
|
308
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
309
|
-
const headers = {};
|
|
310
|
-
b.bp("/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents");
|
|
311
|
-
b.p("coreDeviceThingName", () => input.coreDeviceThingName, "{coreDeviceThingName}", false);
|
|
312
|
-
const query = (0, smithy_client_1.map)({
|
|
313
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
314
|
-
[_nT]: [, input[_nT]],
|
|
315
|
-
[_tF]: [, input[_tF]],
|
|
316
|
-
});
|
|
317
|
-
let body;
|
|
318
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
319
|
-
return b.build();
|
|
320
|
-
};
|
|
321
|
-
exports.se_ListInstalledComponentsCommand = se_ListInstalledComponentsCommand;
|
|
322
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
323
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
324
|
-
const headers = {};
|
|
325
|
-
b.bp("/tags/{resourceArn}");
|
|
326
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
327
|
-
let body;
|
|
328
|
-
b.m("GET").h(headers).b(body);
|
|
329
|
-
return b.build();
|
|
330
|
-
};
|
|
331
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
332
|
-
const se_ResolveComponentCandidatesCommand = async (input, context) => {
|
|
333
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
334
|
-
const headers = {
|
|
335
|
-
"content-type": "application/json",
|
|
336
|
-
};
|
|
337
|
-
b.bp("/greengrass/v2/resolveComponentCandidates");
|
|
338
|
-
let body;
|
|
339
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
340
|
-
componentCandidates: (_) => (0, smithy_client_1._json)(_),
|
|
341
|
-
platform: (_) => (0, smithy_client_1._json)(_),
|
|
342
|
-
}));
|
|
343
|
-
b.m("POST").h(headers).b(body);
|
|
344
|
-
return b.build();
|
|
345
|
-
};
|
|
346
|
-
exports.se_ResolveComponentCandidatesCommand = se_ResolveComponentCandidatesCommand;
|
|
347
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
348
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
349
|
-
const headers = {
|
|
350
|
-
"content-type": "application/json",
|
|
351
|
-
};
|
|
352
|
-
b.bp("/tags/{resourceArn}");
|
|
353
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
354
|
-
let body;
|
|
355
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
356
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
357
|
-
}));
|
|
358
|
-
b.m("POST").h(headers).b(body);
|
|
359
|
-
return b.build();
|
|
360
|
-
};
|
|
361
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
362
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
363
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
364
|
-
const headers = {};
|
|
365
|
-
b.bp("/tags/{resourceArn}");
|
|
366
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
367
|
-
const query = (0, smithy_client_1.map)({
|
|
368
|
-
[_tK]: [
|
|
369
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
370
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
371
|
-
],
|
|
372
|
-
});
|
|
373
|
-
let body;
|
|
374
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
375
|
-
return b.build();
|
|
376
|
-
};
|
|
377
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
378
|
-
const se_UpdateConnectivityInfoCommand = async (input, context) => {
|
|
379
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
380
|
-
const headers = {
|
|
381
|
-
"content-type": "application/json",
|
|
382
|
-
};
|
|
383
|
-
b.bp("/greengrass/things/{thingName}/connectivityInfo");
|
|
384
|
-
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
385
|
-
let body;
|
|
386
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
387
|
-
ConnectivityInfo: [, (_) => se_connectivityInfoList(_, context), `connectivityInfo`],
|
|
388
|
-
}));
|
|
389
|
-
b.m("PUT").h(headers).b(body);
|
|
390
|
-
return b.build();
|
|
391
|
-
};
|
|
392
|
-
exports.se_UpdateConnectivityInfoCommand = se_UpdateConnectivityInfoCommand;
|
|
393
|
-
const de_AssociateServiceRoleToAccountCommand = async (output, context) => {
|
|
394
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
|
-
return de_AssociateServiceRoleToAccountCommandError(output, context);
|
|
396
|
-
}
|
|
397
|
-
const contents = (0, smithy_client_1.map)({
|
|
398
|
-
$metadata: deserializeMetadata(output),
|
|
399
|
-
});
|
|
400
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
401
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
-
associatedAt: [, smithy_client_1.expectString, `AssociatedAt`],
|
|
403
|
-
});
|
|
404
|
-
Object.assign(contents, doc);
|
|
405
|
-
return contents;
|
|
406
|
-
};
|
|
407
|
-
exports.de_AssociateServiceRoleToAccountCommand = de_AssociateServiceRoleToAccountCommand;
|
|
408
|
-
const de_AssociateServiceRoleToAccountCommandError = async (output, context) => {
|
|
409
|
-
const parsedOutput = {
|
|
410
|
-
...output,
|
|
411
|
-
body: await parseErrorBody(output.body, context),
|
|
412
|
-
};
|
|
413
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
414
|
-
switch (errorCode) {
|
|
415
|
-
case "InternalServerException":
|
|
416
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
417
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
418
|
-
case "ValidationException":
|
|
419
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
420
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
421
|
-
default:
|
|
422
|
-
const parsedBody = parsedOutput.body;
|
|
423
|
-
return throwDefaultError({
|
|
424
|
-
output,
|
|
425
|
-
parsedBody,
|
|
426
|
-
errorCode,
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
const de_BatchAssociateClientDeviceWithCoreDeviceCommand = async (output, context) => {
|
|
431
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
432
|
-
return de_BatchAssociateClientDeviceWithCoreDeviceCommandError(output, context);
|
|
433
|
-
}
|
|
434
|
-
const contents = (0, smithy_client_1.map)({
|
|
435
|
-
$metadata: deserializeMetadata(output),
|
|
436
|
-
});
|
|
437
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
438
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
439
|
-
errorEntries: smithy_client_1._json,
|
|
440
|
-
});
|
|
441
|
-
Object.assign(contents, doc);
|
|
442
|
-
return contents;
|
|
443
|
-
};
|
|
444
|
-
exports.de_BatchAssociateClientDeviceWithCoreDeviceCommand = de_BatchAssociateClientDeviceWithCoreDeviceCommand;
|
|
445
|
-
const de_BatchAssociateClientDeviceWithCoreDeviceCommandError = async (output, context) => {
|
|
446
|
-
const parsedOutput = {
|
|
447
|
-
...output,
|
|
448
|
-
body: await parseErrorBody(output.body, context),
|
|
449
|
-
};
|
|
450
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
451
|
-
switch (errorCode) {
|
|
452
|
-
case "AccessDeniedException":
|
|
453
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
454
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
455
|
-
case "InternalServerException":
|
|
456
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
457
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
458
|
-
case "ResourceNotFoundException":
|
|
459
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
460
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
461
|
-
case "ThrottlingException":
|
|
462
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
463
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
464
|
-
case "ValidationException":
|
|
465
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
466
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
467
|
-
default:
|
|
468
|
-
const parsedBody = parsedOutput.body;
|
|
469
|
-
return throwDefaultError({
|
|
470
|
-
output,
|
|
471
|
-
parsedBody,
|
|
472
|
-
errorCode,
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
const de_BatchDisassociateClientDeviceFromCoreDeviceCommand = async (output, context) => {
|
|
477
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
478
|
-
return de_BatchDisassociateClientDeviceFromCoreDeviceCommandError(output, context);
|
|
479
|
-
}
|
|
480
|
-
const contents = (0, smithy_client_1.map)({
|
|
481
|
-
$metadata: deserializeMetadata(output),
|
|
482
|
-
});
|
|
483
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
484
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
485
|
-
errorEntries: smithy_client_1._json,
|
|
486
|
-
});
|
|
487
|
-
Object.assign(contents, doc);
|
|
488
|
-
return contents;
|
|
489
|
-
};
|
|
490
|
-
exports.de_BatchDisassociateClientDeviceFromCoreDeviceCommand = de_BatchDisassociateClientDeviceFromCoreDeviceCommand;
|
|
491
|
-
const de_BatchDisassociateClientDeviceFromCoreDeviceCommandError = async (output, context) => {
|
|
492
|
-
const parsedOutput = {
|
|
493
|
-
...output,
|
|
494
|
-
body: await parseErrorBody(output.body, context),
|
|
495
|
-
};
|
|
496
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
497
|
-
switch (errorCode) {
|
|
498
|
-
case "AccessDeniedException":
|
|
499
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
500
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
501
|
-
case "InternalServerException":
|
|
502
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
503
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
504
|
-
case "ResourceNotFoundException":
|
|
505
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
506
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
507
|
-
case "ThrottlingException":
|
|
508
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
509
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
510
|
-
case "ValidationException":
|
|
511
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
512
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
513
|
-
default:
|
|
514
|
-
const parsedBody = parsedOutput.body;
|
|
515
|
-
return throwDefaultError({
|
|
516
|
-
output,
|
|
517
|
-
parsedBody,
|
|
518
|
-
errorCode,
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
const de_CancelDeploymentCommand = async (output, context) => {
|
|
523
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
524
|
-
return de_CancelDeploymentCommandError(output, context);
|
|
525
|
-
}
|
|
526
|
-
const contents = (0, smithy_client_1.map)({
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
});
|
|
529
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
530
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
531
|
-
message: smithy_client_1.expectString,
|
|
532
|
-
});
|
|
533
|
-
Object.assign(contents, doc);
|
|
534
|
-
return contents;
|
|
535
|
-
};
|
|
536
|
-
exports.de_CancelDeploymentCommand = de_CancelDeploymentCommand;
|
|
537
|
-
const de_CancelDeploymentCommandError = async (output, context) => {
|
|
538
|
-
const parsedOutput = {
|
|
539
|
-
...output,
|
|
540
|
-
body: await parseErrorBody(output.body, context),
|
|
541
|
-
};
|
|
542
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
-
switch (errorCode) {
|
|
544
|
-
case "AccessDeniedException":
|
|
545
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
546
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
547
|
-
case "ConflictException":
|
|
548
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
549
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
550
|
-
case "InternalServerException":
|
|
551
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
552
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
553
|
-
case "ResourceNotFoundException":
|
|
554
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
555
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
556
|
-
case "ThrottlingException":
|
|
557
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
558
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
559
|
-
case "ValidationException":
|
|
560
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
561
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
562
|
-
default:
|
|
563
|
-
const parsedBody = parsedOutput.body;
|
|
564
|
-
return throwDefaultError({
|
|
565
|
-
output,
|
|
566
|
-
parsedBody,
|
|
567
|
-
errorCode,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const de_CreateComponentVersionCommand = async (output, context) => {
|
|
572
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
573
|
-
return de_CreateComponentVersionCommandError(output, context);
|
|
574
|
-
}
|
|
575
|
-
const contents = (0, smithy_client_1.map)({
|
|
576
|
-
$metadata: deserializeMetadata(output),
|
|
577
|
-
});
|
|
578
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
579
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
580
|
-
arn: smithy_client_1.expectString,
|
|
581
|
-
componentName: smithy_client_1.expectString,
|
|
582
|
-
componentVersion: smithy_client_1.expectString,
|
|
583
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
584
|
-
status: smithy_client_1._json,
|
|
585
|
-
});
|
|
586
|
-
Object.assign(contents, doc);
|
|
587
|
-
return contents;
|
|
588
|
-
};
|
|
589
|
-
exports.de_CreateComponentVersionCommand = de_CreateComponentVersionCommand;
|
|
590
|
-
const de_CreateComponentVersionCommandError = async (output, context) => {
|
|
591
|
-
const parsedOutput = {
|
|
592
|
-
...output,
|
|
593
|
-
body: await parseErrorBody(output.body, context),
|
|
594
|
-
};
|
|
595
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
596
|
-
switch (errorCode) {
|
|
597
|
-
case "AccessDeniedException":
|
|
598
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
599
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
600
|
-
case "ConflictException":
|
|
601
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
602
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
603
|
-
case "InternalServerException":
|
|
604
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
605
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
606
|
-
case "RequestAlreadyInProgressException":
|
|
607
|
-
case "com.amazonaws.greengrassv2#RequestAlreadyInProgressException":
|
|
608
|
-
throw await de_RequestAlreadyInProgressExceptionRes(parsedOutput, context);
|
|
609
|
-
case "ServiceQuotaExceededException":
|
|
610
|
-
case "com.amazonaws.greengrassv2#ServiceQuotaExceededException":
|
|
611
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
612
|
-
case "ThrottlingException":
|
|
613
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
614
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
615
|
-
case "ValidationException":
|
|
616
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
617
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
618
|
-
default:
|
|
619
|
-
const parsedBody = parsedOutput.body;
|
|
620
|
-
return throwDefaultError({
|
|
621
|
-
output,
|
|
622
|
-
parsedBody,
|
|
623
|
-
errorCode,
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
const de_CreateDeploymentCommand = async (output, context) => {
|
|
628
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
629
|
-
return de_CreateDeploymentCommandError(output, context);
|
|
630
|
-
}
|
|
631
|
-
const contents = (0, smithy_client_1.map)({
|
|
632
|
-
$metadata: deserializeMetadata(output),
|
|
633
|
-
});
|
|
634
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
635
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
636
|
-
deploymentId: smithy_client_1.expectString,
|
|
637
|
-
iotJobArn: smithy_client_1.expectString,
|
|
638
|
-
iotJobId: smithy_client_1.expectString,
|
|
639
|
-
});
|
|
640
|
-
Object.assign(contents, doc);
|
|
641
|
-
return contents;
|
|
642
|
-
};
|
|
643
|
-
exports.de_CreateDeploymentCommand = de_CreateDeploymentCommand;
|
|
644
|
-
const de_CreateDeploymentCommandError = async (output, context) => {
|
|
645
|
-
const parsedOutput = {
|
|
646
|
-
...output,
|
|
647
|
-
body: await parseErrorBody(output.body, context),
|
|
648
|
-
};
|
|
649
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
650
|
-
switch (errorCode) {
|
|
651
|
-
case "AccessDeniedException":
|
|
652
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
653
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
654
|
-
case "ConflictException":
|
|
655
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
656
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
657
|
-
case "InternalServerException":
|
|
658
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
659
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
660
|
-
case "RequestAlreadyInProgressException":
|
|
661
|
-
case "com.amazonaws.greengrassv2#RequestAlreadyInProgressException":
|
|
662
|
-
throw await de_RequestAlreadyInProgressExceptionRes(parsedOutput, context);
|
|
663
|
-
case "ResourceNotFoundException":
|
|
664
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
665
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
666
|
-
case "ThrottlingException":
|
|
667
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
668
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
669
|
-
case "ValidationException":
|
|
670
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
671
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
672
|
-
default:
|
|
673
|
-
const parsedBody = parsedOutput.body;
|
|
674
|
-
return throwDefaultError({
|
|
675
|
-
output,
|
|
676
|
-
parsedBody,
|
|
677
|
-
errorCode,
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
|
-
const de_DeleteComponentCommand = async (output, context) => {
|
|
682
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
683
|
-
return de_DeleteComponentCommandError(output, context);
|
|
684
|
-
}
|
|
685
|
-
const contents = (0, smithy_client_1.map)({
|
|
686
|
-
$metadata: deserializeMetadata(output),
|
|
687
|
-
});
|
|
688
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
689
|
-
return contents;
|
|
690
|
-
};
|
|
691
|
-
exports.de_DeleteComponentCommand = de_DeleteComponentCommand;
|
|
692
|
-
const de_DeleteComponentCommandError = async (output, context) => {
|
|
693
|
-
const parsedOutput = {
|
|
694
|
-
...output,
|
|
695
|
-
body: await parseErrorBody(output.body, context),
|
|
696
|
-
};
|
|
697
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
698
|
-
switch (errorCode) {
|
|
699
|
-
case "AccessDeniedException":
|
|
700
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
701
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
702
|
-
case "ConflictException":
|
|
703
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
704
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
705
|
-
case "InternalServerException":
|
|
706
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
707
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
708
|
-
case "ResourceNotFoundException":
|
|
709
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
710
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
711
|
-
case "ThrottlingException":
|
|
712
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
713
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
714
|
-
case "ValidationException":
|
|
715
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
716
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
717
|
-
default:
|
|
718
|
-
const parsedBody = parsedOutput.body;
|
|
719
|
-
return throwDefaultError({
|
|
720
|
-
output,
|
|
721
|
-
parsedBody,
|
|
722
|
-
errorCode,
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
};
|
|
726
|
-
const de_DeleteCoreDeviceCommand = async (output, context) => {
|
|
727
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
728
|
-
return de_DeleteCoreDeviceCommandError(output, context);
|
|
729
|
-
}
|
|
730
|
-
const contents = (0, smithy_client_1.map)({
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
});
|
|
733
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
734
|
-
return contents;
|
|
735
|
-
};
|
|
736
|
-
exports.de_DeleteCoreDeviceCommand = de_DeleteCoreDeviceCommand;
|
|
737
|
-
const de_DeleteCoreDeviceCommandError = async (output, context) => {
|
|
738
|
-
const parsedOutput = {
|
|
739
|
-
...output,
|
|
740
|
-
body: await parseErrorBody(output.body, context),
|
|
741
|
-
};
|
|
742
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
743
|
-
switch (errorCode) {
|
|
744
|
-
case "AccessDeniedException":
|
|
745
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
746
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
747
|
-
case "ConflictException":
|
|
748
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
749
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
750
|
-
case "InternalServerException":
|
|
751
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
752
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
753
|
-
case "ResourceNotFoundException":
|
|
754
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
755
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
756
|
-
case "ThrottlingException":
|
|
757
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
758
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
759
|
-
case "ValidationException":
|
|
760
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
761
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
762
|
-
default:
|
|
763
|
-
const parsedBody = parsedOutput.body;
|
|
764
|
-
return throwDefaultError({
|
|
765
|
-
output,
|
|
766
|
-
parsedBody,
|
|
767
|
-
errorCode,
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
};
|
|
771
|
-
const de_DeleteDeploymentCommand = async (output, context) => {
|
|
772
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
773
|
-
return de_DeleteDeploymentCommandError(output, context);
|
|
774
|
-
}
|
|
775
|
-
const contents = (0, smithy_client_1.map)({
|
|
776
|
-
$metadata: deserializeMetadata(output),
|
|
777
|
-
});
|
|
778
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
779
|
-
return contents;
|
|
780
|
-
};
|
|
781
|
-
exports.de_DeleteDeploymentCommand = de_DeleteDeploymentCommand;
|
|
782
|
-
const de_DeleteDeploymentCommandError = async (output, context) => {
|
|
783
|
-
const parsedOutput = {
|
|
784
|
-
...output,
|
|
785
|
-
body: await parseErrorBody(output.body, context),
|
|
786
|
-
};
|
|
787
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
788
|
-
switch (errorCode) {
|
|
789
|
-
case "AccessDeniedException":
|
|
790
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
791
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
792
|
-
case "ConflictException":
|
|
793
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
794
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
795
|
-
case "InternalServerException":
|
|
796
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
797
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
798
|
-
case "ResourceNotFoundException":
|
|
799
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
800
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
801
|
-
case "ThrottlingException":
|
|
802
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
803
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
804
|
-
case "ValidationException":
|
|
805
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
806
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
807
|
-
default:
|
|
808
|
-
const parsedBody = parsedOutput.body;
|
|
809
|
-
return throwDefaultError({
|
|
810
|
-
output,
|
|
811
|
-
parsedBody,
|
|
812
|
-
errorCode,
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
};
|
|
816
|
-
const de_DescribeComponentCommand = async (output, context) => {
|
|
817
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
818
|
-
return de_DescribeComponentCommandError(output, context);
|
|
819
|
-
}
|
|
820
|
-
const contents = (0, smithy_client_1.map)({
|
|
821
|
-
$metadata: deserializeMetadata(output),
|
|
822
|
-
});
|
|
823
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
824
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
825
|
-
arn: smithy_client_1.expectString,
|
|
826
|
-
componentName: smithy_client_1.expectString,
|
|
827
|
-
componentVersion: smithy_client_1.expectString,
|
|
828
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
829
|
-
description: smithy_client_1.expectString,
|
|
830
|
-
platforms: smithy_client_1._json,
|
|
831
|
-
publisher: smithy_client_1.expectString,
|
|
832
|
-
status: smithy_client_1._json,
|
|
833
|
-
tags: smithy_client_1._json,
|
|
834
|
-
});
|
|
835
|
-
Object.assign(contents, doc);
|
|
836
|
-
return contents;
|
|
837
|
-
};
|
|
838
|
-
exports.de_DescribeComponentCommand = de_DescribeComponentCommand;
|
|
839
|
-
const de_DescribeComponentCommandError = async (output, context) => {
|
|
840
|
-
const parsedOutput = {
|
|
841
|
-
...output,
|
|
842
|
-
body: await parseErrorBody(output.body, context),
|
|
843
|
-
};
|
|
844
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
845
|
-
switch (errorCode) {
|
|
846
|
-
case "AccessDeniedException":
|
|
847
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
848
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
849
|
-
case "InternalServerException":
|
|
850
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
851
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
852
|
-
case "ResourceNotFoundException":
|
|
853
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
854
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
855
|
-
case "ThrottlingException":
|
|
856
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
857
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
858
|
-
case "ValidationException":
|
|
859
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
860
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
861
|
-
default:
|
|
862
|
-
const parsedBody = parsedOutput.body;
|
|
863
|
-
return throwDefaultError({
|
|
864
|
-
output,
|
|
865
|
-
parsedBody,
|
|
866
|
-
errorCode,
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
|
-
const de_DisassociateServiceRoleFromAccountCommand = async (output, context) => {
|
|
871
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
872
|
-
return de_DisassociateServiceRoleFromAccountCommandError(output, context);
|
|
873
|
-
}
|
|
874
|
-
const contents = (0, smithy_client_1.map)({
|
|
875
|
-
$metadata: deserializeMetadata(output),
|
|
876
|
-
});
|
|
877
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
878
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
879
|
-
disassociatedAt: [, smithy_client_1.expectString, `DisassociatedAt`],
|
|
880
|
-
});
|
|
881
|
-
Object.assign(contents, doc);
|
|
882
|
-
return contents;
|
|
883
|
-
};
|
|
884
|
-
exports.de_DisassociateServiceRoleFromAccountCommand = de_DisassociateServiceRoleFromAccountCommand;
|
|
885
|
-
const de_DisassociateServiceRoleFromAccountCommandError = async (output, context) => {
|
|
886
|
-
const parsedOutput = {
|
|
887
|
-
...output,
|
|
888
|
-
body: await parseErrorBody(output.body, context),
|
|
889
|
-
};
|
|
890
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
|
-
switch (errorCode) {
|
|
892
|
-
case "InternalServerException":
|
|
893
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
894
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
895
|
-
default:
|
|
896
|
-
const parsedBody = parsedOutput.body;
|
|
897
|
-
return throwDefaultError({
|
|
898
|
-
output,
|
|
899
|
-
parsedBody,
|
|
900
|
-
errorCode,
|
|
901
|
-
});
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
const de_GetComponentCommand = async (output, context) => {
|
|
905
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
906
|
-
return de_GetComponentCommandError(output, context);
|
|
907
|
-
}
|
|
908
|
-
const contents = (0, smithy_client_1.map)({
|
|
909
|
-
$metadata: deserializeMetadata(output),
|
|
910
|
-
});
|
|
911
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
912
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
913
|
-
recipe: context.base64Decoder,
|
|
914
|
-
recipeOutputFormat: smithy_client_1.expectString,
|
|
915
|
-
tags: smithy_client_1._json,
|
|
916
|
-
});
|
|
917
|
-
Object.assign(contents, doc);
|
|
918
|
-
return contents;
|
|
919
|
-
};
|
|
920
|
-
exports.de_GetComponentCommand = de_GetComponentCommand;
|
|
921
|
-
const de_GetComponentCommandError = async (output, context) => {
|
|
922
|
-
const parsedOutput = {
|
|
923
|
-
...output,
|
|
924
|
-
body: await parseErrorBody(output.body, context),
|
|
925
|
-
};
|
|
926
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
927
|
-
switch (errorCode) {
|
|
928
|
-
case "AccessDeniedException":
|
|
929
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
930
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
931
|
-
case "InternalServerException":
|
|
932
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
933
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
934
|
-
case "ResourceNotFoundException":
|
|
935
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
936
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
937
|
-
case "ThrottlingException":
|
|
938
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
939
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
940
|
-
case "ValidationException":
|
|
941
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
942
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
943
|
-
default:
|
|
944
|
-
const parsedBody = parsedOutput.body;
|
|
945
|
-
return throwDefaultError({
|
|
946
|
-
output,
|
|
947
|
-
parsedBody,
|
|
948
|
-
errorCode,
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
const de_GetComponentVersionArtifactCommand = async (output, context) => {
|
|
953
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
954
|
-
return de_GetComponentVersionArtifactCommandError(output, context);
|
|
955
|
-
}
|
|
956
|
-
const contents = (0, smithy_client_1.map)({
|
|
957
|
-
$metadata: deserializeMetadata(output),
|
|
958
|
-
});
|
|
959
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
960
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
961
|
-
preSignedUrl: smithy_client_1.expectString,
|
|
962
|
-
});
|
|
963
|
-
Object.assign(contents, doc);
|
|
964
|
-
return contents;
|
|
965
|
-
};
|
|
966
|
-
exports.de_GetComponentVersionArtifactCommand = de_GetComponentVersionArtifactCommand;
|
|
967
|
-
const de_GetComponentVersionArtifactCommandError = async (output, context) => {
|
|
968
|
-
const parsedOutput = {
|
|
969
|
-
...output,
|
|
970
|
-
body: await parseErrorBody(output.body, context),
|
|
971
|
-
};
|
|
972
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
973
|
-
switch (errorCode) {
|
|
974
|
-
case "AccessDeniedException":
|
|
975
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
976
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
977
|
-
case "InternalServerException":
|
|
978
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
979
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
980
|
-
case "ResourceNotFoundException":
|
|
981
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
982
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
983
|
-
case "ThrottlingException":
|
|
984
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
985
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
986
|
-
case "ValidationException":
|
|
987
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
988
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
989
|
-
default:
|
|
990
|
-
const parsedBody = parsedOutput.body;
|
|
991
|
-
return throwDefaultError({
|
|
992
|
-
output,
|
|
993
|
-
parsedBody,
|
|
994
|
-
errorCode,
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
};
|
|
998
|
-
const de_GetConnectivityInfoCommand = async (output, context) => {
|
|
999
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1000
|
-
return de_GetConnectivityInfoCommandError(output, context);
|
|
1001
|
-
}
|
|
1002
|
-
const contents = (0, smithy_client_1.map)({
|
|
1003
|
-
$metadata: deserializeMetadata(output),
|
|
1004
|
-
});
|
|
1005
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1006
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1007
|
-
connectivityInfo: [, (_) => de_connectivityInfoList(_, context), `ConnectivityInfo`],
|
|
1008
|
-
message: [, smithy_client_1.expectString, `Message`],
|
|
1009
|
-
});
|
|
1010
|
-
Object.assign(contents, doc);
|
|
1011
|
-
return contents;
|
|
1012
|
-
};
|
|
1013
|
-
exports.de_GetConnectivityInfoCommand = de_GetConnectivityInfoCommand;
|
|
1014
|
-
const de_GetConnectivityInfoCommandError = async (output, context) => {
|
|
1015
|
-
const parsedOutput = {
|
|
1016
|
-
...output,
|
|
1017
|
-
body: await parseErrorBody(output.body, context),
|
|
1018
|
-
};
|
|
1019
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1020
|
-
switch (errorCode) {
|
|
1021
|
-
case "InternalServerException":
|
|
1022
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1023
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1024
|
-
case "ValidationException":
|
|
1025
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1026
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1027
|
-
default:
|
|
1028
|
-
const parsedBody = parsedOutput.body;
|
|
1029
|
-
return throwDefaultError({
|
|
1030
|
-
output,
|
|
1031
|
-
parsedBody,
|
|
1032
|
-
errorCode,
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
};
|
|
1036
|
-
const de_GetCoreDeviceCommand = async (output, context) => {
|
|
1037
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1038
|
-
return de_GetCoreDeviceCommandError(output, context);
|
|
1039
|
-
}
|
|
1040
|
-
const contents = (0, smithy_client_1.map)({
|
|
1041
|
-
$metadata: deserializeMetadata(output),
|
|
1042
|
-
});
|
|
1043
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1044
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1045
|
-
architecture: smithy_client_1.expectString,
|
|
1046
|
-
coreDeviceThingName: smithy_client_1.expectString,
|
|
1047
|
-
coreVersion: smithy_client_1.expectString,
|
|
1048
|
-
lastStatusUpdateTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1049
|
-
platform: smithy_client_1.expectString,
|
|
1050
|
-
status: smithy_client_1.expectString,
|
|
1051
|
-
tags: smithy_client_1._json,
|
|
1052
|
-
});
|
|
1053
|
-
Object.assign(contents, doc);
|
|
1054
|
-
return contents;
|
|
1055
|
-
};
|
|
1056
|
-
exports.de_GetCoreDeviceCommand = de_GetCoreDeviceCommand;
|
|
1057
|
-
const de_GetCoreDeviceCommandError = async (output, context) => {
|
|
1058
|
-
const parsedOutput = {
|
|
1059
|
-
...output,
|
|
1060
|
-
body: await parseErrorBody(output.body, context),
|
|
1061
|
-
};
|
|
1062
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1063
|
-
switch (errorCode) {
|
|
1064
|
-
case "AccessDeniedException":
|
|
1065
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1066
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1067
|
-
case "InternalServerException":
|
|
1068
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1069
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1070
|
-
case "ResourceNotFoundException":
|
|
1071
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1072
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1073
|
-
case "ThrottlingException":
|
|
1074
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1075
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1076
|
-
case "ValidationException":
|
|
1077
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1078
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1079
|
-
default:
|
|
1080
|
-
const parsedBody = parsedOutput.body;
|
|
1081
|
-
return throwDefaultError({
|
|
1082
|
-
output,
|
|
1083
|
-
parsedBody,
|
|
1084
|
-
errorCode,
|
|
1085
|
-
});
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
|
-
const de_GetDeploymentCommand = async (output, context) => {
|
|
1089
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1090
|
-
return de_GetDeploymentCommandError(output, context);
|
|
1091
|
-
}
|
|
1092
|
-
const contents = (0, smithy_client_1.map)({
|
|
1093
|
-
$metadata: deserializeMetadata(output),
|
|
1094
|
-
});
|
|
1095
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1096
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1097
|
-
components: (_) => de_ComponentDeploymentSpecifications(_, context),
|
|
1098
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1099
|
-
deploymentId: smithy_client_1.expectString,
|
|
1100
|
-
deploymentName: smithy_client_1.expectString,
|
|
1101
|
-
deploymentPolicies: smithy_client_1._json,
|
|
1102
|
-
deploymentStatus: smithy_client_1.expectString,
|
|
1103
|
-
iotJobArn: smithy_client_1.expectString,
|
|
1104
|
-
iotJobConfiguration: (_) => de_DeploymentIoTJobConfiguration(_, context),
|
|
1105
|
-
iotJobId: smithy_client_1.expectString,
|
|
1106
|
-
isLatestForTarget: smithy_client_1.expectBoolean,
|
|
1107
|
-
parentTargetArn: smithy_client_1.expectString,
|
|
1108
|
-
revisionId: smithy_client_1.expectString,
|
|
1109
|
-
tags: smithy_client_1._json,
|
|
1110
|
-
targetArn: smithy_client_1.expectString,
|
|
1111
|
-
});
|
|
1112
|
-
Object.assign(contents, doc);
|
|
1113
|
-
return contents;
|
|
1114
|
-
};
|
|
1115
|
-
exports.de_GetDeploymentCommand = de_GetDeploymentCommand;
|
|
1116
|
-
const de_GetDeploymentCommandError = async (output, context) => {
|
|
1117
|
-
const parsedOutput = {
|
|
1118
|
-
...output,
|
|
1119
|
-
body: await parseErrorBody(output.body, context),
|
|
1120
|
-
};
|
|
1121
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1122
|
-
switch (errorCode) {
|
|
1123
|
-
case "AccessDeniedException":
|
|
1124
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1125
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1126
|
-
case "InternalServerException":
|
|
1127
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1128
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1129
|
-
case "ResourceNotFoundException":
|
|
1130
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1131
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1132
|
-
case "ThrottlingException":
|
|
1133
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1134
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1135
|
-
case "ValidationException":
|
|
1136
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1137
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1138
|
-
default:
|
|
1139
|
-
const parsedBody = parsedOutput.body;
|
|
1140
|
-
return throwDefaultError({
|
|
1141
|
-
output,
|
|
1142
|
-
parsedBody,
|
|
1143
|
-
errorCode,
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
const de_GetServiceRoleForAccountCommand = async (output, context) => {
|
|
1148
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1149
|
-
return de_GetServiceRoleForAccountCommandError(output, context);
|
|
1150
|
-
}
|
|
1151
|
-
const contents = (0, smithy_client_1.map)({
|
|
1152
|
-
$metadata: deserializeMetadata(output),
|
|
1153
|
-
});
|
|
1154
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1155
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1156
|
-
associatedAt: [, smithy_client_1.expectString, `AssociatedAt`],
|
|
1157
|
-
roleArn: [, smithy_client_1.expectString, `RoleArn`],
|
|
1158
|
-
});
|
|
1159
|
-
Object.assign(contents, doc);
|
|
1160
|
-
return contents;
|
|
1161
|
-
};
|
|
1162
|
-
exports.de_GetServiceRoleForAccountCommand = de_GetServiceRoleForAccountCommand;
|
|
1163
|
-
const de_GetServiceRoleForAccountCommandError = async (output, context) => {
|
|
1164
|
-
const parsedOutput = {
|
|
1165
|
-
...output,
|
|
1166
|
-
body: await parseErrorBody(output.body, context),
|
|
1167
|
-
};
|
|
1168
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1169
|
-
switch (errorCode) {
|
|
1170
|
-
case "InternalServerException":
|
|
1171
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1172
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1173
|
-
default:
|
|
1174
|
-
const parsedBody = parsedOutput.body;
|
|
1175
|
-
return throwDefaultError({
|
|
1176
|
-
output,
|
|
1177
|
-
parsedBody,
|
|
1178
|
-
errorCode,
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
};
|
|
1182
|
-
const de_ListClientDevicesAssociatedWithCoreDeviceCommand = async (output, context) => {
|
|
1183
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1184
|
-
return de_ListClientDevicesAssociatedWithCoreDeviceCommandError(output, context);
|
|
1185
|
-
}
|
|
1186
|
-
const contents = (0, smithy_client_1.map)({
|
|
1187
|
-
$metadata: deserializeMetadata(output),
|
|
1188
|
-
});
|
|
1189
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1190
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1191
|
-
associatedClientDevices: (_) => de_AssociatedClientDeviceList(_, context),
|
|
1192
|
-
nextToken: smithy_client_1.expectString,
|
|
1193
|
-
});
|
|
1194
|
-
Object.assign(contents, doc);
|
|
1195
|
-
return contents;
|
|
1196
|
-
};
|
|
1197
|
-
exports.de_ListClientDevicesAssociatedWithCoreDeviceCommand = de_ListClientDevicesAssociatedWithCoreDeviceCommand;
|
|
1198
|
-
const de_ListClientDevicesAssociatedWithCoreDeviceCommandError = async (output, context) => {
|
|
1199
|
-
const parsedOutput = {
|
|
1200
|
-
...output,
|
|
1201
|
-
body: await parseErrorBody(output.body, context),
|
|
1202
|
-
};
|
|
1203
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1204
|
-
switch (errorCode) {
|
|
1205
|
-
case "AccessDeniedException":
|
|
1206
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1207
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1208
|
-
case "InternalServerException":
|
|
1209
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1210
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1211
|
-
case "ResourceNotFoundException":
|
|
1212
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1213
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1214
|
-
case "ThrottlingException":
|
|
1215
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1216
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1217
|
-
case "ValidationException":
|
|
1218
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1219
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1220
|
-
default:
|
|
1221
|
-
const parsedBody = parsedOutput.body;
|
|
1222
|
-
return throwDefaultError({
|
|
1223
|
-
output,
|
|
1224
|
-
parsedBody,
|
|
1225
|
-
errorCode,
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
|
-
};
|
|
1229
|
-
const de_ListComponentsCommand = async (output, context) => {
|
|
1230
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1231
|
-
return de_ListComponentsCommandError(output, context);
|
|
1232
|
-
}
|
|
1233
|
-
const contents = (0, smithy_client_1.map)({
|
|
1234
|
-
$metadata: deserializeMetadata(output),
|
|
1235
|
-
});
|
|
1236
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1237
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1238
|
-
components: (_) => de_ComponentList(_, context),
|
|
1239
|
-
nextToken: smithy_client_1.expectString,
|
|
1240
|
-
});
|
|
1241
|
-
Object.assign(contents, doc);
|
|
1242
|
-
return contents;
|
|
1243
|
-
};
|
|
1244
|
-
exports.de_ListComponentsCommand = de_ListComponentsCommand;
|
|
1245
|
-
const de_ListComponentsCommandError = async (output, context) => {
|
|
1246
|
-
const parsedOutput = {
|
|
1247
|
-
...output,
|
|
1248
|
-
body: await parseErrorBody(output.body, context),
|
|
1249
|
-
};
|
|
1250
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1251
|
-
switch (errorCode) {
|
|
1252
|
-
case "AccessDeniedException":
|
|
1253
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1254
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1255
|
-
case "InternalServerException":
|
|
1256
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1257
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1258
|
-
case "ResourceNotFoundException":
|
|
1259
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1260
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1261
|
-
case "ThrottlingException":
|
|
1262
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1263
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1264
|
-
case "ValidationException":
|
|
1265
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1266
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1267
|
-
default:
|
|
1268
|
-
const parsedBody = parsedOutput.body;
|
|
1269
|
-
return throwDefaultError({
|
|
1270
|
-
output,
|
|
1271
|
-
parsedBody,
|
|
1272
|
-
errorCode,
|
|
1273
|
-
});
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
const de_ListComponentVersionsCommand = async (output, context) => {
|
|
1277
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1278
|
-
return de_ListComponentVersionsCommandError(output, context);
|
|
1279
|
-
}
|
|
1280
|
-
const contents = (0, smithy_client_1.map)({
|
|
1281
|
-
$metadata: deserializeMetadata(output),
|
|
1282
|
-
});
|
|
1283
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1284
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1285
|
-
componentVersions: smithy_client_1._json,
|
|
1286
|
-
nextToken: smithy_client_1.expectString,
|
|
1287
|
-
});
|
|
1288
|
-
Object.assign(contents, doc);
|
|
1289
|
-
return contents;
|
|
1290
|
-
};
|
|
1291
|
-
exports.de_ListComponentVersionsCommand = de_ListComponentVersionsCommand;
|
|
1292
|
-
const de_ListComponentVersionsCommandError = async (output, context) => {
|
|
1293
|
-
const parsedOutput = {
|
|
1294
|
-
...output,
|
|
1295
|
-
body: await parseErrorBody(output.body, context),
|
|
1296
|
-
};
|
|
1297
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1298
|
-
switch (errorCode) {
|
|
1299
|
-
case "AccessDeniedException":
|
|
1300
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1301
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1302
|
-
case "InternalServerException":
|
|
1303
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1304
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1305
|
-
case "ResourceNotFoundException":
|
|
1306
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1307
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1308
|
-
case "ThrottlingException":
|
|
1309
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1310
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1311
|
-
case "ValidationException":
|
|
1312
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1313
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1314
|
-
default:
|
|
1315
|
-
const parsedBody = parsedOutput.body;
|
|
1316
|
-
return throwDefaultError({
|
|
1317
|
-
output,
|
|
1318
|
-
parsedBody,
|
|
1319
|
-
errorCode,
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
};
|
|
1323
|
-
const de_ListCoreDevicesCommand = async (output, context) => {
|
|
1324
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1325
|
-
return de_ListCoreDevicesCommandError(output, context);
|
|
1326
|
-
}
|
|
1327
|
-
const contents = (0, smithy_client_1.map)({
|
|
1328
|
-
$metadata: deserializeMetadata(output),
|
|
1329
|
-
});
|
|
1330
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1331
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1332
|
-
coreDevices: (_) => de_CoreDevicesList(_, context),
|
|
1333
|
-
nextToken: smithy_client_1.expectString,
|
|
1334
|
-
});
|
|
1335
|
-
Object.assign(contents, doc);
|
|
1336
|
-
return contents;
|
|
1337
|
-
};
|
|
1338
|
-
exports.de_ListCoreDevicesCommand = de_ListCoreDevicesCommand;
|
|
1339
|
-
const de_ListCoreDevicesCommandError = async (output, context) => {
|
|
1340
|
-
const parsedOutput = {
|
|
1341
|
-
...output,
|
|
1342
|
-
body: await parseErrorBody(output.body, context),
|
|
1343
|
-
};
|
|
1344
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1345
|
-
switch (errorCode) {
|
|
1346
|
-
case "AccessDeniedException":
|
|
1347
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1348
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1349
|
-
case "InternalServerException":
|
|
1350
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1351
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1352
|
-
case "ThrottlingException":
|
|
1353
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1354
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1355
|
-
case "ValidationException":
|
|
1356
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1357
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1358
|
-
default:
|
|
1359
|
-
const parsedBody = parsedOutput.body;
|
|
1360
|
-
return throwDefaultError({
|
|
1361
|
-
output,
|
|
1362
|
-
parsedBody,
|
|
1363
|
-
errorCode,
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
};
|
|
1367
|
-
const de_ListDeploymentsCommand = async (output, context) => {
|
|
1368
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1369
|
-
return de_ListDeploymentsCommandError(output, context);
|
|
1370
|
-
}
|
|
1371
|
-
const contents = (0, smithy_client_1.map)({
|
|
1372
|
-
$metadata: deserializeMetadata(output),
|
|
1373
|
-
});
|
|
1374
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1375
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1376
|
-
deployments: (_) => de_DeploymentList(_, context),
|
|
1377
|
-
nextToken: smithy_client_1.expectString,
|
|
1378
|
-
});
|
|
1379
|
-
Object.assign(contents, doc);
|
|
1380
|
-
return contents;
|
|
1381
|
-
};
|
|
1382
|
-
exports.de_ListDeploymentsCommand = de_ListDeploymentsCommand;
|
|
1383
|
-
const de_ListDeploymentsCommandError = async (output, context) => {
|
|
1384
|
-
const parsedOutput = {
|
|
1385
|
-
...output,
|
|
1386
|
-
body: await parseErrorBody(output.body, context),
|
|
1387
|
-
};
|
|
1388
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1389
|
-
switch (errorCode) {
|
|
1390
|
-
case "AccessDeniedException":
|
|
1391
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1392
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1393
|
-
case "InternalServerException":
|
|
1394
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1395
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1396
|
-
case "ThrottlingException":
|
|
1397
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1398
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1399
|
-
case "ValidationException":
|
|
1400
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1401
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1402
|
-
default:
|
|
1403
|
-
const parsedBody = parsedOutput.body;
|
|
1404
|
-
return throwDefaultError({
|
|
1405
|
-
output,
|
|
1406
|
-
parsedBody,
|
|
1407
|
-
errorCode,
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
};
|
|
1411
|
-
const de_ListEffectiveDeploymentsCommand = async (output, context) => {
|
|
1412
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1413
|
-
return de_ListEffectiveDeploymentsCommandError(output, context);
|
|
1414
|
-
}
|
|
1415
|
-
const contents = (0, smithy_client_1.map)({
|
|
1416
|
-
$metadata: deserializeMetadata(output),
|
|
1417
|
-
});
|
|
1418
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1419
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1420
|
-
effectiveDeployments: (_) => de_EffectiveDeploymentsList(_, context),
|
|
1421
|
-
nextToken: smithy_client_1.expectString,
|
|
1422
|
-
});
|
|
1423
|
-
Object.assign(contents, doc);
|
|
1424
|
-
return contents;
|
|
1425
|
-
};
|
|
1426
|
-
exports.de_ListEffectiveDeploymentsCommand = de_ListEffectiveDeploymentsCommand;
|
|
1427
|
-
const de_ListEffectiveDeploymentsCommandError = async (output, context) => {
|
|
1428
|
-
const parsedOutput = {
|
|
1429
|
-
...output,
|
|
1430
|
-
body: await parseErrorBody(output.body, context),
|
|
1431
|
-
};
|
|
1432
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1433
|
-
switch (errorCode) {
|
|
1434
|
-
case "AccessDeniedException":
|
|
1435
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1436
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1437
|
-
case "InternalServerException":
|
|
1438
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1439
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1440
|
-
case "ResourceNotFoundException":
|
|
1441
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1442
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1443
|
-
case "ThrottlingException":
|
|
1444
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1445
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1446
|
-
case "ValidationException":
|
|
1447
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1448
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1449
|
-
default:
|
|
1450
|
-
const parsedBody = parsedOutput.body;
|
|
1451
|
-
return throwDefaultError({
|
|
1452
|
-
output,
|
|
1453
|
-
parsedBody,
|
|
1454
|
-
errorCode,
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
|
-
};
|
|
1458
|
-
const de_ListInstalledComponentsCommand = async (output, context) => {
|
|
1459
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1460
|
-
return de_ListInstalledComponentsCommandError(output, context);
|
|
1461
|
-
}
|
|
1462
|
-
const contents = (0, smithy_client_1.map)({
|
|
1463
|
-
$metadata: deserializeMetadata(output),
|
|
1464
|
-
});
|
|
1465
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1466
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1467
|
-
installedComponents: (_) => de_InstalledComponentList(_, context),
|
|
1468
|
-
nextToken: smithy_client_1.expectString,
|
|
1469
|
-
});
|
|
1470
|
-
Object.assign(contents, doc);
|
|
1471
|
-
return contents;
|
|
1472
|
-
};
|
|
1473
|
-
exports.de_ListInstalledComponentsCommand = de_ListInstalledComponentsCommand;
|
|
1474
|
-
const de_ListInstalledComponentsCommandError = async (output, context) => {
|
|
1475
|
-
const parsedOutput = {
|
|
1476
|
-
...output,
|
|
1477
|
-
body: await parseErrorBody(output.body, context),
|
|
1478
|
-
};
|
|
1479
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1480
|
-
switch (errorCode) {
|
|
1481
|
-
case "AccessDeniedException":
|
|
1482
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1483
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1484
|
-
case "InternalServerException":
|
|
1485
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1486
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1487
|
-
case "ResourceNotFoundException":
|
|
1488
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1489
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1490
|
-
case "ThrottlingException":
|
|
1491
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1492
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1493
|
-
case "ValidationException":
|
|
1494
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1495
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1496
|
-
default:
|
|
1497
|
-
const parsedBody = parsedOutput.body;
|
|
1498
|
-
return throwDefaultError({
|
|
1499
|
-
output,
|
|
1500
|
-
parsedBody,
|
|
1501
|
-
errorCode,
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
};
|
|
1505
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1506
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1507
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1508
|
-
}
|
|
1509
|
-
const contents = (0, smithy_client_1.map)({
|
|
1510
|
-
$metadata: deserializeMetadata(output),
|
|
1511
|
-
});
|
|
1512
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1513
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1514
|
-
tags: smithy_client_1._json,
|
|
1515
|
-
});
|
|
1516
|
-
Object.assign(contents, doc);
|
|
1517
|
-
return contents;
|
|
1518
|
-
};
|
|
1519
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1520
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1521
|
-
const parsedOutput = {
|
|
1522
|
-
...output,
|
|
1523
|
-
body: await parseErrorBody(output.body, context),
|
|
1524
|
-
};
|
|
1525
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1526
|
-
switch (errorCode) {
|
|
1527
|
-
case "InternalServerException":
|
|
1528
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1529
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1530
|
-
case "ResourceNotFoundException":
|
|
1531
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1532
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1533
|
-
case "ValidationException":
|
|
1534
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1535
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1536
|
-
default:
|
|
1537
|
-
const parsedBody = parsedOutput.body;
|
|
1538
|
-
return throwDefaultError({
|
|
1539
|
-
output,
|
|
1540
|
-
parsedBody,
|
|
1541
|
-
errorCode,
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
};
|
|
1545
|
-
const de_ResolveComponentCandidatesCommand = async (output, context) => {
|
|
1546
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1547
|
-
return de_ResolveComponentCandidatesCommandError(output, context);
|
|
1548
|
-
}
|
|
1549
|
-
const contents = (0, smithy_client_1.map)({
|
|
1550
|
-
$metadata: deserializeMetadata(output),
|
|
1551
|
-
});
|
|
1552
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1553
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1554
|
-
resolvedComponentVersions: (_) => de_ResolvedComponentVersionsList(_, context),
|
|
1555
|
-
});
|
|
1556
|
-
Object.assign(contents, doc);
|
|
1557
|
-
return contents;
|
|
1558
|
-
};
|
|
1559
|
-
exports.de_ResolveComponentCandidatesCommand = de_ResolveComponentCandidatesCommand;
|
|
1560
|
-
const de_ResolveComponentCandidatesCommandError = async (output, context) => {
|
|
1561
|
-
const parsedOutput = {
|
|
1562
|
-
...output,
|
|
1563
|
-
body: await parseErrorBody(output.body, context),
|
|
1564
|
-
};
|
|
1565
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1566
|
-
switch (errorCode) {
|
|
1567
|
-
case "AccessDeniedException":
|
|
1568
|
-
case "com.amazonaws.greengrassv2#AccessDeniedException":
|
|
1569
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1570
|
-
case "ConflictException":
|
|
1571
|
-
case "com.amazonaws.greengrassv2#ConflictException":
|
|
1572
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1573
|
-
case "InternalServerException":
|
|
1574
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1575
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1576
|
-
case "ResourceNotFoundException":
|
|
1577
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1578
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1579
|
-
case "ThrottlingException":
|
|
1580
|
-
case "com.amazonaws.greengrassv2#ThrottlingException":
|
|
1581
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1582
|
-
case "ValidationException":
|
|
1583
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1584
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1585
|
-
default:
|
|
1586
|
-
const parsedBody = parsedOutput.body;
|
|
1587
|
-
return throwDefaultError({
|
|
1588
|
-
output,
|
|
1589
|
-
parsedBody,
|
|
1590
|
-
errorCode,
|
|
1591
|
-
});
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1595
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1596
|
-
return de_TagResourceCommandError(output, context);
|
|
1597
|
-
}
|
|
1598
|
-
const contents = (0, smithy_client_1.map)({
|
|
1599
|
-
$metadata: deserializeMetadata(output),
|
|
1600
|
-
});
|
|
1601
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1602
|
-
return contents;
|
|
1603
|
-
};
|
|
1604
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1605
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1606
|
-
const parsedOutput = {
|
|
1607
|
-
...output,
|
|
1608
|
-
body: await parseErrorBody(output.body, context),
|
|
1609
|
-
};
|
|
1610
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1611
|
-
switch (errorCode) {
|
|
1612
|
-
case "InternalServerException":
|
|
1613
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1614
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1615
|
-
case "ResourceNotFoundException":
|
|
1616
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1617
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1618
|
-
case "ValidationException":
|
|
1619
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1620
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1621
|
-
default:
|
|
1622
|
-
const parsedBody = parsedOutput.body;
|
|
1623
|
-
return throwDefaultError({
|
|
1624
|
-
output,
|
|
1625
|
-
parsedBody,
|
|
1626
|
-
errorCode,
|
|
1627
|
-
});
|
|
1628
|
-
}
|
|
1629
|
-
};
|
|
1630
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1631
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1632
|
-
return de_UntagResourceCommandError(output, context);
|
|
1633
|
-
}
|
|
1634
|
-
const contents = (0, smithy_client_1.map)({
|
|
1635
|
-
$metadata: deserializeMetadata(output),
|
|
1636
|
-
});
|
|
1637
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1638
|
-
return contents;
|
|
1639
|
-
};
|
|
1640
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1641
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1642
|
-
const parsedOutput = {
|
|
1643
|
-
...output,
|
|
1644
|
-
body: await parseErrorBody(output.body, context),
|
|
1645
|
-
};
|
|
1646
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1647
|
-
switch (errorCode) {
|
|
1648
|
-
case "InternalServerException":
|
|
1649
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1650
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1651
|
-
case "ResourceNotFoundException":
|
|
1652
|
-
case "com.amazonaws.greengrassv2#ResourceNotFoundException":
|
|
1653
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1654
|
-
case "ValidationException":
|
|
1655
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1656
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1657
|
-
default:
|
|
1658
|
-
const parsedBody = parsedOutput.body;
|
|
1659
|
-
return throwDefaultError({
|
|
1660
|
-
output,
|
|
1661
|
-
parsedBody,
|
|
1662
|
-
errorCode,
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
};
|
|
1666
|
-
const de_UpdateConnectivityInfoCommand = async (output, context) => {
|
|
1667
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1668
|
-
return de_UpdateConnectivityInfoCommandError(output, context);
|
|
1669
|
-
}
|
|
1670
|
-
const contents = (0, smithy_client_1.map)({
|
|
1671
|
-
$metadata: deserializeMetadata(output),
|
|
1672
|
-
});
|
|
1673
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1674
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1675
|
-
message: [, smithy_client_1.expectString, `Message`],
|
|
1676
|
-
version: [, smithy_client_1.expectString, `Version`],
|
|
1677
|
-
});
|
|
1678
|
-
Object.assign(contents, doc);
|
|
1679
|
-
return contents;
|
|
1680
|
-
};
|
|
1681
|
-
exports.de_UpdateConnectivityInfoCommand = de_UpdateConnectivityInfoCommand;
|
|
1682
|
-
const de_UpdateConnectivityInfoCommandError = async (output, context) => {
|
|
1683
|
-
const parsedOutput = {
|
|
1684
|
-
...output,
|
|
1685
|
-
body: await parseErrorBody(output.body, context),
|
|
1686
|
-
};
|
|
1687
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1688
|
-
switch (errorCode) {
|
|
1689
|
-
case "InternalServerException":
|
|
1690
|
-
case "com.amazonaws.greengrassv2#InternalServerException":
|
|
1691
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1692
|
-
case "ValidationException":
|
|
1693
|
-
case "com.amazonaws.greengrassv2#ValidationException":
|
|
1694
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1695
|
-
default:
|
|
1696
|
-
const parsedBody = parsedOutput.body;
|
|
1697
|
-
return throwDefaultError({
|
|
1698
|
-
output,
|
|
1699
|
-
parsedBody,
|
|
1700
|
-
errorCode,
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
|
-
};
|
|
1704
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(GreengrassV2ServiceException_1.GreengrassV2ServiceException);
|
|
1705
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1706
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1707
|
-
const data = parsedOutput.body;
|
|
1708
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1709
|
-
message: smithy_client_1.expectString,
|
|
1710
|
-
});
|
|
1711
|
-
Object.assign(contents, doc);
|
|
1712
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1713
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1714
|
-
...contents,
|
|
1715
|
-
});
|
|
1716
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1717
|
-
};
|
|
1718
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1719
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1720
|
-
const data = parsedOutput.body;
|
|
1721
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1722
|
-
message: smithy_client_1.expectString,
|
|
1723
|
-
resourceId: smithy_client_1.expectString,
|
|
1724
|
-
resourceType: smithy_client_1.expectString,
|
|
1725
|
-
});
|
|
1726
|
-
Object.assign(contents, doc);
|
|
1727
|
-
const exception = new models_0_1.ConflictException({
|
|
1728
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1729
|
-
...contents,
|
|
1730
|
-
});
|
|
1731
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1732
|
-
};
|
|
1733
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1734
|
-
const contents = (0, smithy_client_1.map)({
|
|
1735
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1736
|
-
});
|
|
1737
|
-
const data = parsedOutput.body;
|
|
1738
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1739
|
-
message: smithy_client_1.expectString,
|
|
1740
|
-
});
|
|
1741
|
-
Object.assign(contents, doc);
|
|
1742
|
-
const exception = new models_0_1.InternalServerException({
|
|
1743
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1744
|
-
...contents,
|
|
1745
|
-
});
|
|
1746
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1747
|
-
};
|
|
1748
|
-
const de_RequestAlreadyInProgressExceptionRes = async (parsedOutput, context) => {
|
|
1749
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1750
|
-
const data = parsedOutput.body;
|
|
1751
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1752
|
-
message: smithy_client_1.expectString,
|
|
1753
|
-
});
|
|
1754
|
-
Object.assign(contents, doc);
|
|
1755
|
-
const exception = new models_0_1.RequestAlreadyInProgressException({
|
|
1756
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1757
|
-
...contents,
|
|
1758
|
-
});
|
|
1759
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1760
|
-
};
|
|
1761
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1762
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1763
|
-
const data = parsedOutput.body;
|
|
1764
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1765
|
-
message: smithy_client_1.expectString,
|
|
1766
|
-
resourceId: smithy_client_1.expectString,
|
|
1767
|
-
resourceType: smithy_client_1.expectString,
|
|
1768
|
-
});
|
|
1769
|
-
Object.assign(contents, doc);
|
|
1770
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1771
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1772
|
-
...contents,
|
|
1773
|
-
});
|
|
1774
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1775
|
-
};
|
|
1776
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1777
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1778
|
-
const data = parsedOutput.body;
|
|
1779
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1780
|
-
message: smithy_client_1.expectString,
|
|
1781
|
-
quotaCode: smithy_client_1.expectString,
|
|
1782
|
-
resourceId: smithy_client_1.expectString,
|
|
1783
|
-
resourceType: smithy_client_1.expectString,
|
|
1784
|
-
serviceCode: smithy_client_1.expectString,
|
|
1785
|
-
});
|
|
1786
|
-
Object.assign(contents, doc);
|
|
1787
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1788
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1789
|
-
...contents,
|
|
1790
|
-
});
|
|
1791
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1792
|
-
};
|
|
1793
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1794
|
-
const contents = (0, smithy_client_1.map)({
|
|
1795
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1796
|
-
});
|
|
1797
|
-
const data = parsedOutput.body;
|
|
1798
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1799
|
-
message: smithy_client_1.expectString,
|
|
1800
|
-
quotaCode: smithy_client_1.expectString,
|
|
1801
|
-
serviceCode: smithy_client_1.expectString,
|
|
1802
|
-
});
|
|
1803
|
-
Object.assign(contents, doc);
|
|
1804
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1805
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1806
|
-
...contents,
|
|
1807
|
-
});
|
|
1808
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1809
|
-
};
|
|
1810
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1811
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1812
|
-
const data = parsedOutput.body;
|
|
1813
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1814
|
-
fields: smithy_client_1._json,
|
|
1815
|
-
message: smithy_client_1.expectString,
|
|
1816
|
-
reason: smithy_client_1.expectString,
|
|
1817
|
-
});
|
|
1818
|
-
Object.assign(contents, doc);
|
|
1819
|
-
const exception = new models_0_1.ValidationException({
|
|
1820
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1821
|
-
...contents,
|
|
1822
|
-
});
|
|
1823
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1824
|
-
};
|
|
1825
|
-
const se_ComponentDeploymentSpecification = (input, context) => {
|
|
1826
|
-
return (0, smithy_client_1.take)(input, {
|
|
1827
|
-
componentVersion: [],
|
|
1828
|
-
configurationUpdate: smithy_client_1._json,
|
|
1829
|
-
runWith: (_) => se_ComponentRunWith(_, context),
|
|
1830
|
-
});
|
|
1831
|
-
};
|
|
1832
|
-
const se_ComponentDeploymentSpecifications = (input, context) => {
|
|
1833
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1834
|
-
if (value === null) {
|
|
1835
|
-
return acc;
|
|
1836
|
-
}
|
|
1837
|
-
acc[key] = se_ComponentDeploymentSpecification(value, context);
|
|
1838
|
-
return acc;
|
|
1839
|
-
}, {});
|
|
1840
|
-
};
|
|
1841
|
-
const se_ComponentRunWith = (input, context) => {
|
|
1842
|
-
return (0, smithy_client_1.take)(input, {
|
|
1843
|
-
posixUser: [],
|
|
1844
|
-
systemResourceLimits: (_) => se_SystemResourceLimits(_, context),
|
|
1845
|
-
windowsUser: [],
|
|
1846
|
-
});
|
|
1847
|
-
};
|
|
1848
|
-
const se_ConnectivityInfo = (input, context) => {
|
|
1849
|
-
return (0, smithy_client_1.take)(input, {
|
|
1850
|
-
HostAddress: [, , `hostAddress`],
|
|
1851
|
-
Id: [, , `id`],
|
|
1852
|
-
Metadata: [, , `metadata`],
|
|
1853
|
-
PortNumber: [, , `portNumber`],
|
|
1854
|
-
});
|
|
1855
|
-
};
|
|
1856
|
-
const se_connectivityInfoList = (input, context) => {
|
|
1857
|
-
return input
|
|
1858
|
-
.filter((e) => e != null)
|
|
1859
|
-
.map((entry) => {
|
|
1860
|
-
return se_ConnectivityInfo(entry, context);
|
|
1861
|
-
});
|
|
1862
|
-
};
|
|
1863
|
-
const se_DeploymentIoTJobConfiguration = (input, context) => {
|
|
1864
|
-
return (0, smithy_client_1.take)(input, {
|
|
1865
|
-
abortConfig: (_) => se_IoTJobAbortConfig(_, context),
|
|
1866
|
-
jobExecutionsRolloutConfig: (_) => se_IoTJobExecutionsRolloutConfig(_, context),
|
|
1867
|
-
timeoutConfig: smithy_client_1._json,
|
|
1868
|
-
});
|
|
1869
|
-
};
|
|
1870
|
-
const se_IoTJobAbortConfig = (input, context) => {
|
|
1871
|
-
return (0, smithy_client_1.take)(input, {
|
|
1872
|
-
criteriaList: (_) => se_IoTJobAbortCriteriaList(_, context),
|
|
1873
|
-
});
|
|
1874
|
-
};
|
|
1875
|
-
const se_IoTJobAbortCriteria = (input, context) => {
|
|
1876
|
-
return (0, smithy_client_1.take)(input, {
|
|
1877
|
-
action: [],
|
|
1878
|
-
failureType: [],
|
|
1879
|
-
minNumberOfExecutedThings: [],
|
|
1880
|
-
thresholdPercentage: smithy_client_1.serializeFloat,
|
|
1881
|
-
});
|
|
1882
|
-
};
|
|
1883
|
-
const se_IoTJobAbortCriteriaList = (input, context) => {
|
|
1884
|
-
return input
|
|
1885
|
-
.filter((e) => e != null)
|
|
1886
|
-
.map((entry) => {
|
|
1887
|
-
return se_IoTJobAbortCriteria(entry, context);
|
|
1888
|
-
});
|
|
1889
|
-
};
|
|
1890
|
-
const se_IoTJobExecutionsRolloutConfig = (input, context) => {
|
|
1891
|
-
return (0, smithy_client_1.take)(input, {
|
|
1892
|
-
exponentialRate: (_) => se_IoTJobExponentialRolloutRate(_, context),
|
|
1893
|
-
maximumPerMinute: [],
|
|
1894
|
-
});
|
|
1895
|
-
};
|
|
1896
|
-
const se_IoTJobExponentialRolloutRate = (input, context) => {
|
|
1897
|
-
return (0, smithy_client_1.take)(input, {
|
|
1898
|
-
baseRatePerMinute: [],
|
|
1899
|
-
incrementFactor: smithy_client_1.serializeFloat,
|
|
1900
|
-
rateIncreaseCriteria: smithy_client_1._json,
|
|
1901
|
-
});
|
|
1902
|
-
};
|
|
1903
|
-
const se_SystemResourceLimits = (input, context) => {
|
|
1904
|
-
return (0, smithy_client_1.take)(input, {
|
|
1905
|
-
cpus: smithy_client_1.serializeFloat,
|
|
1906
|
-
memory: [],
|
|
1907
|
-
});
|
|
1908
|
-
};
|
|
1909
|
-
const de_AssociatedClientDevice = (output, context) => {
|
|
1910
|
-
return (0, smithy_client_1.take)(output, {
|
|
1911
|
-
associationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1912
|
-
thingName: smithy_client_1.expectString,
|
|
1913
|
-
});
|
|
1914
|
-
};
|
|
1915
|
-
const de_AssociatedClientDeviceList = (output, context) => {
|
|
1916
|
-
const retVal = (output || [])
|
|
1917
|
-
.filter((e) => e != null)
|
|
1918
|
-
.map((entry) => {
|
|
1919
|
-
return de_AssociatedClientDevice(entry, context);
|
|
1920
|
-
});
|
|
1921
|
-
return retVal;
|
|
1922
|
-
};
|
|
1923
|
-
const de_Component = (output, context) => {
|
|
1924
|
-
return (0, smithy_client_1.take)(output, {
|
|
1925
|
-
arn: smithy_client_1.expectString,
|
|
1926
|
-
componentName: smithy_client_1.expectString,
|
|
1927
|
-
latestVersion: (_) => de_ComponentLatestVersion(_, context),
|
|
1928
|
-
});
|
|
1929
|
-
};
|
|
1930
|
-
const de_ComponentDeploymentSpecification = (output, context) => {
|
|
1931
|
-
return (0, smithy_client_1.take)(output, {
|
|
1932
|
-
componentVersion: smithy_client_1.expectString,
|
|
1933
|
-
configurationUpdate: smithy_client_1._json,
|
|
1934
|
-
runWith: (_) => de_ComponentRunWith(_, context),
|
|
1935
|
-
});
|
|
1936
|
-
};
|
|
1937
|
-
const de_ComponentDeploymentSpecifications = (output, context) => {
|
|
1938
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1939
|
-
if (value === null) {
|
|
1940
|
-
return acc;
|
|
1941
|
-
}
|
|
1942
|
-
acc[key] = de_ComponentDeploymentSpecification(value, context);
|
|
1943
|
-
return acc;
|
|
1944
|
-
}, {});
|
|
1945
|
-
};
|
|
1946
|
-
const de_ComponentLatestVersion = (output, context) => {
|
|
1947
|
-
return (0, smithy_client_1.take)(output, {
|
|
1948
|
-
arn: smithy_client_1.expectString,
|
|
1949
|
-
componentVersion: smithy_client_1.expectString,
|
|
1950
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1951
|
-
description: smithy_client_1.expectString,
|
|
1952
|
-
platforms: smithy_client_1._json,
|
|
1953
|
-
publisher: smithy_client_1.expectString,
|
|
1954
|
-
});
|
|
1955
|
-
};
|
|
1956
|
-
const de_ComponentList = (output, context) => {
|
|
1957
|
-
const retVal = (output || [])
|
|
1958
|
-
.filter((e) => e != null)
|
|
1959
|
-
.map((entry) => {
|
|
1960
|
-
return de_Component(entry, context);
|
|
1961
|
-
});
|
|
1962
|
-
return retVal;
|
|
1963
|
-
};
|
|
1964
|
-
const de_ComponentRunWith = (output, context) => {
|
|
1965
|
-
return (0, smithy_client_1.take)(output, {
|
|
1966
|
-
posixUser: smithy_client_1.expectString,
|
|
1967
|
-
systemResourceLimits: (_) => de_SystemResourceLimits(_, context),
|
|
1968
|
-
windowsUser: smithy_client_1.expectString,
|
|
1969
|
-
});
|
|
1970
|
-
};
|
|
1971
|
-
const de_ConnectivityInfo = (output, context) => {
|
|
1972
|
-
return (0, smithy_client_1.take)(output, {
|
|
1973
|
-
hostAddress: [, smithy_client_1.expectString, `HostAddress`],
|
|
1974
|
-
id: [, smithy_client_1.expectString, `Id`],
|
|
1975
|
-
metadata: [, smithy_client_1.expectString, `Metadata`],
|
|
1976
|
-
portNumber: [, smithy_client_1.expectInt32, `PortNumber`],
|
|
1977
|
-
});
|
|
1978
|
-
};
|
|
1979
|
-
const de_connectivityInfoList = (output, context) => {
|
|
1980
|
-
const retVal = (output || [])
|
|
1981
|
-
.filter((e) => e != null)
|
|
1982
|
-
.map((entry) => {
|
|
1983
|
-
return de_ConnectivityInfo(entry, context);
|
|
1984
|
-
});
|
|
1985
|
-
return retVal;
|
|
1986
|
-
};
|
|
1987
|
-
const de_CoreDevice = (output, context) => {
|
|
1988
|
-
return (0, smithy_client_1.take)(output, {
|
|
1989
|
-
coreDeviceThingName: smithy_client_1.expectString,
|
|
1990
|
-
lastStatusUpdateTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1991
|
-
status: smithy_client_1.expectString,
|
|
1992
|
-
});
|
|
1993
|
-
};
|
|
1994
|
-
const de_CoreDevicesList = (output, context) => {
|
|
1995
|
-
const retVal = (output || [])
|
|
1996
|
-
.filter((e) => e != null)
|
|
1997
|
-
.map((entry) => {
|
|
1998
|
-
return de_CoreDevice(entry, context);
|
|
1999
|
-
});
|
|
2000
|
-
return retVal;
|
|
2001
|
-
};
|
|
2002
|
-
const de_Deployment = (output, context) => {
|
|
2003
|
-
return (0, smithy_client_1.take)(output, {
|
|
2004
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2005
|
-
deploymentId: smithy_client_1.expectString,
|
|
2006
|
-
deploymentName: smithy_client_1.expectString,
|
|
2007
|
-
deploymentStatus: smithy_client_1.expectString,
|
|
2008
|
-
isLatestForTarget: smithy_client_1.expectBoolean,
|
|
2009
|
-
parentTargetArn: smithy_client_1.expectString,
|
|
2010
|
-
revisionId: smithy_client_1.expectString,
|
|
2011
|
-
targetArn: smithy_client_1.expectString,
|
|
2012
|
-
});
|
|
2013
|
-
};
|
|
2014
|
-
const de_DeploymentIoTJobConfiguration = (output, context) => {
|
|
2015
|
-
return (0, smithy_client_1.take)(output, {
|
|
2016
|
-
abortConfig: (_) => de_IoTJobAbortConfig(_, context),
|
|
2017
|
-
jobExecutionsRolloutConfig: (_) => de_IoTJobExecutionsRolloutConfig(_, context),
|
|
2018
|
-
timeoutConfig: smithy_client_1._json,
|
|
2019
|
-
});
|
|
2020
|
-
};
|
|
2021
|
-
const de_DeploymentList = (output, context) => {
|
|
2022
|
-
const retVal = (output || [])
|
|
2023
|
-
.filter((e) => e != null)
|
|
2024
|
-
.map((entry) => {
|
|
2025
|
-
return de_Deployment(entry, context);
|
|
2026
|
-
});
|
|
2027
|
-
return retVal;
|
|
2028
|
-
};
|
|
2029
|
-
const de_EffectiveDeployment = (output, context) => {
|
|
2030
|
-
return (0, smithy_client_1.take)(output, {
|
|
2031
|
-
coreDeviceExecutionStatus: smithy_client_1.expectString,
|
|
2032
|
-
creationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2033
|
-
deploymentId: smithy_client_1.expectString,
|
|
2034
|
-
deploymentName: smithy_client_1.expectString,
|
|
2035
|
-
description: smithy_client_1.expectString,
|
|
2036
|
-
iotJobArn: smithy_client_1.expectString,
|
|
2037
|
-
iotJobId: smithy_client_1.expectString,
|
|
2038
|
-
modifiedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2039
|
-
reason: smithy_client_1.expectString,
|
|
2040
|
-
statusDetails: smithy_client_1._json,
|
|
2041
|
-
targetArn: smithy_client_1.expectString,
|
|
2042
|
-
});
|
|
2043
|
-
};
|
|
2044
|
-
const de_EffectiveDeploymentsList = (output, context) => {
|
|
2045
|
-
const retVal = (output || [])
|
|
2046
|
-
.filter((e) => e != null)
|
|
2047
|
-
.map((entry) => {
|
|
2048
|
-
return de_EffectiveDeployment(entry, context);
|
|
2049
|
-
});
|
|
2050
|
-
return retVal;
|
|
2051
|
-
};
|
|
2052
|
-
const de_InstalledComponent = (output, context) => {
|
|
2053
|
-
return (0, smithy_client_1.take)(output, {
|
|
2054
|
-
componentName: smithy_client_1.expectString,
|
|
2055
|
-
componentVersion: smithy_client_1.expectString,
|
|
2056
|
-
isRoot: smithy_client_1.expectBoolean,
|
|
2057
|
-
lastInstallationSource: smithy_client_1.expectString,
|
|
2058
|
-
lastReportedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2059
|
-
lastStatusChangeTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2060
|
-
lifecycleState: smithy_client_1.expectString,
|
|
2061
|
-
lifecycleStateDetails: smithy_client_1.expectString,
|
|
2062
|
-
lifecycleStatusCodes: smithy_client_1._json,
|
|
2063
|
-
});
|
|
2064
|
-
};
|
|
2065
|
-
const de_InstalledComponentList = (output, context) => {
|
|
2066
|
-
const retVal = (output || [])
|
|
2067
|
-
.filter((e) => e != null)
|
|
2068
|
-
.map((entry) => {
|
|
2069
|
-
return de_InstalledComponent(entry, context);
|
|
2070
|
-
});
|
|
2071
|
-
return retVal;
|
|
2072
|
-
};
|
|
2073
|
-
const de_IoTJobAbortConfig = (output, context) => {
|
|
2074
|
-
return (0, smithy_client_1.take)(output, {
|
|
2075
|
-
criteriaList: (_) => de_IoTJobAbortCriteriaList(_, context),
|
|
2076
|
-
});
|
|
2077
|
-
};
|
|
2078
|
-
const de_IoTJobAbortCriteria = (output, context) => {
|
|
2079
|
-
return (0, smithy_client_1.take)(output, {
|
|
2080
|
-
action: smithy_client_1.expectString,
|
|
2081
|
-
failureType: smithy_client_1.expectString,
|
|
2082
|
-
minNumberOfExecutedThings: smithy_client_1.expectInt32,
|
|
2083
|
-
thresholdPercentage: smithy_client_1.limitedParseDouble,
|
|
2084
|
-
});
|
|
2085
|
-
};
|
|
2086
|
-
const de_IoTJobAbortCriteriaList = (output, context) => {
|
|
2087
|
-
const retVal = (output || [])
|
|
2088
|
-
.filter((e) => e != null)
|
|
2089
|
-
.map((entry) => {
|
|
2090
|
-
return de_IoTJobAbortCriteria(entry, context);
|
|
2091
|
-
});
|
|
2092
|
-
return retVal;
|
|
2093
|
-
};
|
|
2094
|
-
const de_IoTJobExecutionsRolloutConfig = (output, context) => {
|
|
2095
|
-
return (0, smithy_client_1.take)(output, {
|
|
2096
|
-
exponentialRate: (_) => de_IoTJobExponentialRolloutRate(_, context),
|
|
2097
|
-
maximumPerMinute: smithy_client_1.expectInt32,
|
|
2098
|
-
});
|
|
2099
|
-
};
|
|
2100
|
-
const de_IoTJobExponentialRolloutRate = (output, context) => {
|
|
2101
|
-
return (0, smithy_client_1.take)(output, {
|
|
2102
|
-
baseRatePerMinute: smithy_client_1.expectInt32,
|
|
2103
|
-
incrementFactor: smithy_client_1.limitedParseDouble,
|
|
2104
|
-
rateIncreaseCriteria: smithy_client_1._json,
|
|
2105
|
-
});
|
|
2106
|
-
};
|
|
2107
|
-
const de_ResolvedComponentVersion = (output, context) => {
|
|
2108
|
-
return (0, smithy_client_1.take)(output, {
|
|
2109
|
-
arn: smithy_client_1.expectString,
|
|
2110
|
-
componentName: smithy_client_1.expectString,
|
|
2111
|
-
componentVersion: smithy_client_1.expectString,
|
|
2112
|
-
message: smithy_client_1.expectString,
|
|
2113
|
-
recipe: context.base64Decoder,
|
|
2114
|
-
vendorGuidance: smithy_client_1.expectString,
|
|
2115
|
-
});
|
|
2116
|
-
};
|
|
2117
|
-
const de_ResolvedComponentVersionsList = (output, context) => {
|
|
2118
|
-
const retVal = (output || [])
|
|
2119
|
-
.filter((e) => e != null)
|
|
2120
|
-
.map((entry) => {
|
|
2121
|
-
return de_ResolvedComponentVersion(entry, context);
|
|
2122
|
-
});
|
|
2123
|
-
return retVal;
|
|
2124
|
-
};
|
|
2125
|
-
const de_SystemResourceLimits = (output, context) => {
|
|
2126
|
-
return (0, smithy_client_1.take)(output, {
|
|
2127
|
-
cpus: smithy_client_1.limitedParseDouble,
|
|
2128
|
-
memory: smithy_client_1.expectLong,
|
|
2129
|
-
});
|
|
2130
|
-
};
|
|
2131
|
-
const deserializeMetadata = (output) => ({
|
|
2132
|
-
httpStatusCode: output.statusCode,
|
|
2133
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2134
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2135
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2136
|
-
});
|
|
2137
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2138
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2139
|
-
value !== null &&
|
|
2140
|
-
value !== "" &&
|
|
2141
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2142
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2143
|
-
const _hF = "historyFilter";
|
|
2144
|
-
const _mR = "maxResults";
|
|
2145
|
-
const _nT = "nextToken";
|
|
2146
|
-
const _pTA = "parentTargetArn";
|
|
2147
|
-
const _rAS = "retryAfterSeconds";
|
|
2148
|
-
const _rOF = "recipeOutputFormat";
|
|
2149
|
-
const _ra = "retry-after";
|
|
2150
|
-
const _s = "scope";
|
|
2151
|
-
const _st = "status";
|
|
2152
|
-
const _tA = "targetArn";
|
|
2153
|
-
const _tF = "topologyFilter";
|
|
2154
|
-
const _tGA = "thingGroupArn";
|
|
2155
|
-
const _tK = "tagKeys";
|
|
2156
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2157
|
-
if (encoded.length) {
|
|
2158
|
-
return JSON.parse(encoded);
|
|
2159
|
-
}
|
|
2160
|
-
return {};
|
|
2161
|
-
});
|
|
2162
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2163
|
-
const value = await parseBody(errorBody, context);
|
|
2164
|
-
value.message = value.message ?? value.Message;
|
|
2165
|
-
return value;
|
|
2166
|
-
};
|
|
2167
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2168
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2169
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2170
|
-
let cleanValue = rawValue;
|
|
2171
|
-
if (typeof cleanValue === "number") {
|
|
2172
|
-
cleanValue = cleanValue.toString();
|
|
2173
|
-
}
|
|
2174
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2175
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2176
|
-
}
|
|
2177
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2178
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2179
|
-
}
|
|
2180
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2181
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2182
|
-
}
|
|
2183
|
-
return cleanValue;
|
|
2184
|
-
};
|
|
2185
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2186
|
-
if (headerKey !== undefined) {
|
|
2187
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2188
|
-
}
|
|
2189
|
-
if (data.code !== undefined) {
|
|
2190
|
-
return sanitizeErrorCode(data.code);
|
|
2191
|
-
}
|
|
2192
|
-
if (data["__type"] !== undefined) {
|
|
2193
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2194
|
-
}
|
|
2195
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|