@aws-sdk/client-marketplace-deployment 3.463.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +237 -0
  3. package/dist-cjs/MarketplaceDeployment.js +19 -0
  4. package/dist-cjs/MarketplaceDeploymentClient.js +43 -0
  5. package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
  6. package/dist-cjs/commands/PutDeploymentParameterCommand.js +52 -0
  7. package/dist-cjs/commands/TagResourceCommand.js +51 -0
  8. package/dist-cjs/commands/UntagResourceCommand.js +51 -0
  9. package/dist-cjs/commands/index.js +7 -0
  10. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  11. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  12. package/dist-cjs/endpoint/ruleset.js +7 -0
  13. package/dist-cjs/extensionConfiguration.js +2 -0
  14. package/dist-cjs/index.js +11 -0
  15. package/dist-cjs/models/MarketplaceDeploymentServiceException.js +12 -0
  16. package/dist-cjs/models/index.js +4 -0
  17. package/dist-cjs/models/models_0.js +114 -0
  18. package/dist-cjs/protocols/Aws_restJson1.js +436 -0
  19. package/dist-cjs/runtimeConfig.browser.js +39 -0
  20. package/dist-cjs/runtimeConfig.js +50 -0
  21. package/dist-cjs/runtimeConfig.native.js +15 -0
  22. package/dist-cjs/runtimeConfig.shared.js +24 -0
  23. package/dist-cjs/runtimeExtensions.js +22 -0
  24. package/dist-es/MarketplaceDeployment.js +15 -0
  25. package/dist-es/MarketplaceDeploymentClient.js +39 -0
  26. package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
  27. package/dist-es/commands/PutDeploymentParameterCommand.js +48 -0
  28. package/dist-es/commands/TagResourceCommand.js +47 -0
  29. package/dist-es/commands/UntagResourceCommand.js +47 -0
  30. package/dist-es/commands/index.js +4 -0
  31. package/dist-es/endpoint/EndpointParameters.js +8 -0
  32. package/dist-es/endpoint/endpointResolver.js +8 -0
  33. package/dist-es/endpoint/ruleset.js +4 -0
  34. package/dist-es/extensionConfiguration.js +1 -0
  35. package/dist-es/index.js +6 -0
  36. package/dist-es/models/MarketplaceDeploymentServiceException.js +8 -0
  37. package/dist-es/models/index.js +1 -0
  38. package/dist-es/models/models_0.js +102 -0
  39. package/dist-es/protocols/Aws_restJson1.js +425 -0
  40. package/dist-es/runtimeConfig.browser.js +34 -0
  41. package/dist-es/runtimeConfig.js +45 -0
  42. package/dist-es/runtimeConfig.native.js +11 -0
  43. package/dist-es/runtimeConfig.shared.js +20 -0
  44. package/dist-es/runtimeExtensions.js +18 -0
  45. package/dist-types/MarketplaceDeployment.d.ts +38 -0
  46. package/dist-types/MarketplaceDeploymentClient.d.ts +173 -0
  47. package/dist-types/commands/ListTagsForResourceCommand.d.ts +90 -0
  48. package/dist-types/commands/PutDeploymentParameterCommand.d.ts +110 -0
  49. package/dist-types/commands/TagResourceCommand.d.ts +92 -0
  50. package/dist-types/commands/UntagResourceCommand.d.ts +92 -0
  51. package/dist-types/commands/index.d.ts +4 -0
  52. package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
  53. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  54. package/dist-types/endpoint/ruleset.d.ts +2 -0
  55. package/dist-types/extensionConfiguration.d.ts +8 -0
  56. package/dist-types/index.d.ts +14 -0
  57. package/dist-types/models/MarketplaceDeploymentServiceException.d.ts +13 -0
  58. package/dist-types/models/index.d.ts +1 -0
  59. package/dist-types/models/models_0.d.ts +250 -0
  60. package/dist-types/protocols/Aws_restJson1.d.ts +38 -0
  61. package/dist-types/runtimeConfig.browser.d.ts +46 -0
  62. package/dist-types/runtimeConfig.d.ts +46 -0
  63. package/dist-types/runtimeConfig.native.d.ts +45 -0
  64. package/dist-types/runtimeConfig.shared.d.ts +19 -0
  65. package/dist-types/runtimeExtensions.d.ts +17 -0
  66. package/dist-types/ts3.4/MarketplaceDeployment.d.ts +75 -0
  67. package/dist-types/ts3.4/MarketplaceDeploymentClient.d.ts +145 -0
  68. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  69. package/dist-types/ts3.4/commands/PutDeploymentParameterCommand.d.ts +42 -0
  70. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
  71. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  72. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  73. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
  74. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  75. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  76. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
  77. package/dist-types/ts3.4/index.d.ts +9 -0
  78. package/dist-types/ts3.4/models/MarketplaceDeploymentServiceException.d.ts +8 -0
  79. package/dist-types/ts3.4/models/index.d.ts +1 -0
  80. package/dist-types/ts3.4/models/models_0.d.ts +96 -0
  81. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +53 -0
  82. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +99 -0
  83. package/dist-types/ts3.4/runtimeConfig.d.ts +99 -0
  84. package/dist-types/ts3.4/runtimeConfig.native.d.ts +90 -0
  85. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  86. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  87. package/package.json +104 -0
@@ -0,0 +1,436 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutDeploymentParameterCommand = exports.de_ListTagsForResourceCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutDeploymentParameterCommand = exports.se_ListTagsForResourceCommand = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const uuid_1 = require("uuid");
7
+ const MarketplaceDeploymentServiceException_1 = require("../models/MarketplaceDeploymentServiceException");
8
+ const models_0_1 = require("../models/models_0");
9
+ const se_ListTagsForResourceCommand = async (input, context) => {
10
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const headers = {};
12
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
13
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
14
+ let body;
15
+ return new protocol_http_1.HttpRequest({
16
+ protocol,
17
+ hostname,
18
+ port,
19
+ method: "GET",
20
+ headers,
21
+ path: resolvedPath,
22
+ body,
23
+ });
24
+ };
25
+ exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
26
+ const se_PutDeploymentParameterCommand = async (input, context) => {
27
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const headers = {
29
+ "content-type": "application/json",
30
+ };
31
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
32
+ "/catalogs/{catalog}/products/{productId}/deployment-parameters";
33
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "catalog", () => input.catalog, "{catalog}", false);
34
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "productId", () => input.productId, "{productId}", false);
35
+ let body;
36
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
37
+ agreementId: [],
38
+ clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
39
+ deploymentParameter: (_) => (0, smithy_client_1._json)(_),
40
+ expirationDate: (_) => _.toISOString().split(".")[0] + "Z",
41
+ tags: (_) => (0, smithy_client_1._json)(_),
42
+ }));
43
+ return new protocol_http_1.HttpRequest({
44
+ protocol,
45
+ hostname,
46
+ port,
47
+ method: "POST",
48
+ headers,
49
+ path: resolvedPath,
50
+ body,
51
+ });
52
+ };
53
+ exports.se_PutDeploymentParameterCommand = se_PutDeploymentParameterCommand;
54
+ const se_TagResourceCommand = async (input, context) => {
55
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const headers = {
57
+ "content-type": "application/json",
58
+ };
59
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
60
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
61
+ let body;
62
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
63
+ tags: (_) => (0, smithy_client_1._json)(_),
64
+ }));
65
+ return new protocol_http_1.HttpRequest({
66
+ protocol,
67
+ hostname,
68
+ port,
69
+ method: "POST",
70
+ headers,
71
+ path: resolvedPath,
72
+ body,
73
+ });
74
+ };
75
+ exports.se_TagResourceCommand = se_TagResourceCommand;
76
+ const se_UntagResourceCommand = async (input, context) => {
77
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const headers = {};
79
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
80
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
81
+ const query = (0, smithy_client_1.map)({
82
+ tagKeys: [
83
+ (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
84
+ () => (input.tagKeys || []).map((_entry) => _entry),
85
+ ],
86
+ });
87
+ let body;
88
+ return new protocol_http_1.HttpRequest({
89
+ protocol,
90
+ hostname,
91
+ port,
92
+ method: "DELETE",
93
+ headers,
94
+ path: resolvedPath,
95
+ query,
96
+ body,
97
+ });
98
+ };
99
+ exports.se_UntagResourceCommand = se_UntagResourceCommand;
100
+ const de_ListTagsForResourceCommand = async (output, context) => {
101
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
102
+ return de_ListTagsForResourceCommandError(output, context);
103
+ }
104
+ const contents = (0, smithy_client_1.map)({
105
+ $metadata: deserializeMetadata(output),
106
+ });
107
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
108
+ const doc = (0, smithy_client_1.take)(data, {
109
+ tags: smithy_client_1._json,
110
+ });
111
+ Object.assign(contents, doc);
112
+ return contents;
113
+ };
114
+ exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
115
+ const de_ListTagsForResourceCommandError = async (output, context) => {
116
+ const parsedOutput = {
117
+ ...output,
118
+ body: await parseErrorBody(output.body, context),
119
+ };
120
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
121
+ switch (errorCode) {
122
+ case "AccessDeniedException":
123
+ case "com.amazonaws.marketplacedeployment#AccessDeniedException":
124
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
125
+ case "InternalServerException":
126
+ case "com.amazonaws.marketplacedeployment#InternalServerException":
127
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
128
+ case "ResourceNotFoundException":
129
+ case "com.amazonaws.marketplacedeployment#ResourceNotFoundException":
130
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
131
+ case "ThrottlingException":
132
+ case "com.amazonaws.marketplacedeployment#ThrottlingException":
133
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
134
+ case "ValidationException":
135
+ case "com.amazonaws.marketplacedeployment#ValidationException":
136
+ throw await de_ValidationExceptionRes(parsedOutput, context);
137
+ default:
138
+ const parsedBody = parsedOutput.body;
139
+ return throwDefaultError({
140
+ output,
141
+ parsedBody,
142
+ errorCode,
143
+ });
144
+ }
145
+ };
146
+ const de_PutDeploymentParameterCommand = async (output, context) => {
147
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
148
+ return de_PutDeploymentParameterCommandError(output, context);
149
+ }
150
+ const contents = (0, smithy_client_1.map)({
151
+ $metadata: deserializeMetadata(output),
152
+ });
153
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
154
+ const doc = (0, smithy_client_1.take)(data, {
155
+ agreementId: smithy_client_1.expectString,
156
+ deploymentParameterId: smithy_client_1.expectString,
157
+ resourceArn: smithy_client_1.expectString,
158
+ tags: smithy_client_1._json,
159
+ });
160
+ Object.assign(contents, doc);
161
+ return contents;
162
+ };
163
+ exports.de_PutDeploymentParameterCommand = de_PutDeploymentParameterCommand;
164
+ const de_PutDeploymentParameterCommandError = async (output, context) => {
165
+ const parsedOutput = {
166
+ ...output,
167
+ body: await parseErrorBody(output.body, context),
168
+ };
169
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
170
+ switch (errorCode) {
171
+ case "AccessDeniedException":
172
+ case "com.amazonaws.marketplacedeployment#AccessDeniedException":
173
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
174
+ case "ConflictException":
175
+ case "com.amazonaws.marketplacedeployment#ConflictException":
176
+ throw await de_ConflictExceptionRes(parsedOutput, context);
177
+ case "InternalServerException":
178
+ case "com.amazonaws.marketplacedeployment#InternalServerException":
179
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
180
+ case "ResourceNotFoundException":
181
+ case "com.amazonaws.marketplacedeployment#ResourceNotFoundException":
182
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
183
+ case "ServiceQuotaExceededException":
184
+ case "com.amazonaws.marketplacedeployment#ServiceQuotaExceededException":
185
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
186
+ case "ThrottlingException":
187
+ case "com.amazonaws.marketplacedeployment#ThrottlingException":
188
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
189
+ case "ValidationException":
190
+ case "com.amazonaws.marketplacedeployment#ValidationException":
191
+ throw await de_ValidationExceptionRes(parsedOutput, context);
192
+ default:
193
+ const parsedBody = parsedOutput.body;
194
+ return throwDefaultError({
195
+ output,
196
+ parsedBody,
197
+ errorCode,
198
+ });
199
+ }
200
+ };
201
+ const de_TagResourceCommand = async (output, context) => {
202
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
203
+ return de_TagResourceCommandError(output, context);
204
+ }
205
+ const contents = (0, smithy_client_1.map)({
206
+ $metadata: deserializeMetadata(output),
207
+ });
208
+ await (0, smithy_client_1.collectBody)(output.body, context);
209
+ return contents;
210
+ };
211
+ exports.de_TagResourceCommand = de_TagResourceCommand;
212
+ const de_TagResourceCommandError = async (output, context) => {
213
+ const parsedOutput = {
214
+ ...output,
215
+ body: await parseErrorBody(output.body, context),
216
+ };
217
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
218
+ switch (errorCode) {
219
+ case "AccessDeniedException":
220
+ case "com.amazonaws.marketplacedeployment#AccessDeniedException":
221
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
222
+ case "ConflictException":
223
+ case "com.amazonaws.marketplacedeployment#ConflictException":
224
+ throw await de_ConflictExceptionRes(parsedOutput, context);
225
+ case "InternalServerException":
226
+ case "com.amazonaws.marketplacedeployment#InternalServerException":
227
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
228
+ case "ResourceNotFoundException":
229
+ case "com.amazonaws.marketplacedeployment#ResourceNotFoundException":
230
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
231
+ case "ThrottlingException":
232
+ case "com.amazonaws.marketplacedeployment#ThrottlingException":
233
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
234
+ case "ValidationException":
235
+ case "com.amazonaws.marketplacedeployment#ValidationException":
236
+ throw await de_ValidationExceptionRes(parsedOutput, context);
237
+ default:
238
+ const parsedBody = parsedOutput.body;
239
+ return throwDefaultError({
240
+ output,
241
+ parsedBody,
242
+ errorCode,
243
+ });
244
+ }
245
+ };
246
+ const de_UntagResourceCommand = async (output, context) => {
247
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
248
+ return de_UntagResourceCommandError(output, context);
249
+ }
250
+ const contents = (0, smithy_client_1.map)({
251
+ $metadata: deserializeMetadata(output),
252
+ });
253
+ await (0, smithy_client_1.collectBody)(output.body, context);
254
+ return contents;
255
+ };
256
+ exports.de_UntagResourceCommand = de_UntagResourceCommand;
257
+ const de_UntagResourceCommandError = async (output, context) => {
258
+ const parsedOutput = {
259
+ ...output,
260
+ body: await parseErrorBody(output.body, context),
261
+ };
262
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
+ switch (errorCode) {
264
+ case "AccessDeniedException":
265
+ case "com.amazonaws.marketplacedeployment#AccessDeniedException":
266
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
267
+ case "ConflictException":
268
+ case "com.amazonaws.marketplacedeployment#ConflictException":
269
+ throw await de_ConflictExceptionRes(parsedOutput, context);
270
+ case "InternalServerException":
271
+ case "com.amazonaws.marketplacedeployment#InternalServerException":
272
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
273
+ case "ResourceNotFoundException":
274
+ case "com.amazonaws.marketplacedeployment#ResourceNotFoundException":
275
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
276
+ case "ThrottlingException":
277
+ case "com.amazonaws.marketplacedeployment#ThrottlingException":
278
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
279
+ case "ValidationException":
280
+ case "com.amazonaws.marketplacedeployment#ValidationException":
281
+ throw await de_ValidationExceptionRes(parsedOutput, context);
282
+ default:
283
+ const parsedBody = parsedOutput.body;
284
+ return throwDefaultError({
285
+ output,
286
+ parsedBody,
287
+ errorCode,
288
+ });
289
+ }
290
+ };
291
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(MarketplaceDeploymentServiceException_1.MarketplaceDeploymentServiceException);
292
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
293
+ const contents = (0, smithy_client_1.map)({});
294
+ const data = parsedOutput.body;
295
+ const doc = (0, smithy_client_1.take)(data, {
296
+ message: smithy_client_1.expectString,
297
+ });
298
+ Object.assign(contents, doc);
299
+ const exception = new models_0_1.AccessDeniedException({
300
+ $metadata: deserializeMetadata(parsedOutput),
301
+ ...contents,
302
+ });
303
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
304
+ };
305
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
306
+ const contents = (0, smithy_client_1.map)({});
307
+ const data = parsedOutput.body;
308
+ const doc = (0, smithy_client_1.take)(data, {
309
+ message: smithy_client_1.expectString,
310
+ resourceId: smithy_client_1.expectString,
311
+ });
312
+ Object.assign(contents, doc);
313
+ const exception = new models_0_1.ConflictException({
314
+ $metadata: deserializeMetadata(parsedOutput),
315
+ ...contents,
316
+ });
317
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
318
+ };
319
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
320
+ const contents = (0, smithy_client_1.map)({});
321
+ const data = parsedOutput.body;
322
+ const doc = (0, smithy_client_1.take)(data, {
323
+ message: smithy_client_1.expectString,
324
+ });
325
+ Object.assign(contents, doc);
326
+ const exception = new models_0_1.InternalServerException({
327
+ $metadata: deserializeMetadata(parsedOutput),
328
+ ...contents,
329
+ });
330
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
331
+ };
332
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
333
+ const contents = (0, smithy_client_1.map)({});
334
+ const data = parsedOutput.body;
335
+ const doc = (0, smithy_client_1.take)(data, {
336
+ message: smithy_client_1.expectString,
337
+ });
338
+ Object.assign(contents, doc);
339
+ const exception = new models_0_1.ResourceNotFoundException({
340
+ $metadata: deserializeMetadata(parsedOutput),
341
+ ...contents,
342
+ });
343
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
344
+ };
345
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
346
+ const contents = (0, smithy_client_1.map)({});
347
+ const data = parsedOutput.body;
348
+ const doc = (0, smithy_client_1.take)(data, {
349
+ message: smithy_client_1.expectString,
350
+ });
351
+ Object.assign(contents, doc);
352
+ const exception = new models_0_1.ServiceQuotaExceededException({
353
+ $metadata: deserializeMetadata(parsedOutput),
354
+ ...contents,
355
+ });
356
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
357
+ };
358
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
359
+ const contents = (0, smithy_client_1.map)({});
360
+ const data = parsedOutput.body;
361
+ const doc = (0, smithy_client_1.take)(data, {
362
+ message: smithy_client_1.expectString,
363
+ });
364
+ Object.assign(contents, doc);
365
+ const exception = new models_0_1.ThrottlingException({
366
+ $metadata: deserializeMetadata(parsedOutput),
367
+ ...contents,
368
+ });
369
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
370
+ };
371
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
372
+ const contents = (0, smithy_client_1.map)({});
373
+ const data = parsedOutput.body;
374
+ const doc = (0, smithy_client_1.take)(data, {
375
+ fieldName: smithy_client_1.expectString,
376
+ message: smithy_client_1.expectString,
377
+ });
378
+ Object.assign(contents, doc);
379
+ const exception = new models_0_1.ValidationException({
380
+ $metadata: deserializeMetadata(parsedOutput),
381
+ ...contents,
382
+ });
383
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
384
+ };
385
+ const deserializeMetadata = (output) => ({
386
+ httpStatusCode: output.statusCode,
387
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
388
+ extendedRequestId: output.headers["x-amz-id-2"],
389
+ cfId: output.headers["x-amz-cf-id"],
390
+ });
391
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
392
+ const isSerializableHeaderValue = (value) => value !== undefined &&
393
+ value !== null &&
394
+ value !== "" &&
395
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
396
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
397
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
398
+ if (encoded.length) {
399
+ return JSON.parse(encoded);
400
+ }
401
+ return {};
402
+ });
403
+ const parseErrorBody = async (errorBody, context) => {
404
+ const value = await parseBody(errorBody, context);
405
+ value.message = value.message ?? value.Message;
406
+ return value;
407
+ };
408
+ const loadRestJsonErrorCode = (output, data) => {
409
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
410
+ const sanitizeErrorCode = (rawValue) => {
411
+ let cleanValue = rawValue;
412
+ if (typeof cleanValue === "number") {
413
+ cleanValue = cleanValue.toString();
414
+ }
415
+ if (cleanValue.indexOf(",") >= 0) {
416
+ cleanValue = cleanValue.split(",")[0];
417
+ }
418
+ if (cleanValue.indexOf(":") >= 0) {
419
+ cleanValue = cleanValue.split(":")[0];
420
+ }
421
+ if (cleanValue.indexOf("#") >= 0) {
422
+ cleanValue = cleanValue.split("#")[1];
423
+ }
424
+ return cleanValue;
425
+ };
426
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
427
+ if (headerKey !== undefined) {
428
+ return sanitizeErrorCode(output.headers[headerKey]);
429
+ }
430
+ if (data.code !== undefined) {
431
+ return sanitizeErrorCode(data.code);
432
+ }
433
+ if (data["__type"] !== undefined) {
434
+ return sanitizeErrorCode(data["__type"]);
435
+ }
436
+ };
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
12
+ const util_retry_1 = require("@smithy/util-retry");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
31
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
34
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
37
+ };
38
+ };
39
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_sts_1 = require("@aws-sdk/client-sts");
7
+ const core_1 = require("@aws-sdk/core");
8
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
10
+ const config_resolver_1 = require("@smithy/config-resolver");
11
+ const hash_node_1 = require("@smithy/hash-node");
12
+ const middleware_retry_1 = require("@smithy/middleware-retry");
13
+ const node_config_provider_1 = require("@smithy/node-config-provider");
14
+ const node_http_handler_1 = require("@smithy/node-http-handler");
15
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
16
+ const util_retry_1 = require("@smithy/util-retry");
17
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
+ const smithy_client_1 = require("@smithy/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
20
+ const smithy_client_2 = require("@smithy/smithy-client");
21
+ const getRuntimeConfig = (config) => {
22
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
23
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
24
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
25
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
26
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
27
+ return {
28
+ ...clientSharedValues,
29
+ ...config,
30
+ runtime: "node",
31
+ defaultsMode,
32
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
33
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
34
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
35
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
36
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
37
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
38
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
39
+ retryMode: config?.retryMode ??
40
+ (0, node_config_provider_1.loadConfig)({
41
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
43
+ }),
44
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
45
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
46
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
+ };
49
+ };
50
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const url_parser_1 = require("@smithy/url-parser");
6
+ const util_base64_1 = require("@smithy/util-base64");
7
+ const util_utf8_1 = require("@smithy/util-utf8");
8
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
9
+ const getRuntimeConfig = (config) => {
10
+ return {
11
+ apiVersion: "2023-01-25",
12
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
13
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
14
+ disableHostPrefix: config?.disableHostPrefix ?? false,
15
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
+ extensions: config?.extensions ?? [],
17
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
+ serviceId: config?.serviceId ?? "Marketplace Deployment",
19
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
20
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
21
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
22
+ };
23
+ };
24
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const asPartial = (t) => t;
8
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
+ const extensionConfiguration = {
10
+ ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
+ ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
+ ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
+ };
14
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
+ return {
16
+ ...runtimeConfig,
17
+ ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
+ ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
+ ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
+ };
21
+ };
22
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,15 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
3
+ import { PutDeploymentParameterCommand, } from "./commands/PutDeploymentParameterCommand";
4
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
5
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
6
+ import { MarketplaceDeploymentClient } from "./MarketplaceDeploymentClient";
7
+ const commands = {
8
+ ListTagsForResourceCommand,
9
+ PutDeploymentParameterCommand,
10
+ TagResourceCommand,
11
+ UntagResourceCommand,
12
+ };
13
+ export class MarketplaceDeployment extends MarketplaceDeploymentClient {
14
+ }
15
+ createAggregatedClient(commands, MarketplaceDeployment);
@@ -0,0 +1,39 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
5
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
6
+ import { resolveRegionConfig } from "@smithy/config-resolver";
7
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
+ import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
12
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
13
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
14
+ export { __Client };
15
+ export class MarketplaceDeploymentClient extends __Client {
16
+ constructor(...[configuration]) {
17
+ const _config_0 = __getRuntimeConfig(configuration || {});
18
+ const _config_1 = resolveClientEndpointParameters(_config_0);
19
+ const _config_2 = resolveRegionConfig(_config_1);
20
+ const _config_3 = resolveEndpointConfig(_config_2);
21
+ const _config_4 = resolveRetryConfig(_config_3);
22
+ const _config_5 = resolveHostHeaderConfig(_config_4);
23
+ const _config_6 = resolveAwsAuthConfig(_config_5);
24
+ const _config_7 = resolveUserAgentConfig(_config_6);
25
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
26
+ super(_config_8);
27
+ this.config = _config_8;
28
+ this.middlewareStack.use(getRetryPlugin(this.config));
29
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
30
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
31
+ this.middlewareStack.use(getLoggerPlugin(this.config));
32
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
33
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
34
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
35
+ }
36
+ destroy() {
37
+ super.destroy();
38
+ }
39
+ }