@aws-sdk/client-cloudfront-keyvaluestore 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/CloudFrontKeyValueStore.js +1 -23
- package/dist-cjs/CloudFrontKeyValueStoreClient.js +1 -43
- package/dist-cjs/commands/DeleteKeyCommand.js +1 -29
- package/dist-cjs/commands/DescribeKeyValueStoreCommand.js +1 -29
- package/dist-cjs/commands/GetKeyCommand.js +1 -30
- package/dist-cjs/commands/ListKeysCommand.js +1 -30
- package/dist-cjs/commands/PutKeyCommand.js +1 -30
- package/dist-cjs/commands/UpdateKeysCommand.js +1 -30
- package/dist-cjs/commands/index.js +1 -9
- package/dist-cjs/endpoint/EndpointParameters.js +1 -16
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +947 -11
- package/dist-cjs/models/CloudFrontKeyValueStoreServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -119
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListKeysPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_restJson1.js +1 -520
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -2
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -2
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +7 -0
- package/package.json +41 -40
|
@@ -1,520 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateKeysCommand = exports.de_PutKeyCommand = exports.de_ListKeysCommand = exports.de_GetKeyCommand = exports.de_DescribeKeyValueStoreCommand = exports.de_DeleteKeyCommand = exports.se_UpdateKeysCommand = exports.se_PutKeyCommand = exports.se_ListKeysCommand = exports.se_GetKeyCommand = exports.se_DescribeKeyValueStoreCommand = exports.se_DeleteKeyCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const CloudFrontKeyValueStoreServiceException_1 = require("../models/CloudFrontKeyValueStoreServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_DeleteKeyCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
11
|
-
[_im]: input[_IM],
|
|
12
|
-
});
|
|
13
|
-
b.bp("/key-value-stores/{KvsARN}/keys/{Key}");
|
|
14
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
15
|
-
b.p("Key", () => input.Key, "{Key}", false);
|
|
16
|
-
let body;
|
|
17
|
-
b.m("DELETE").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
exports.se_DeleteKeyCommand = se_DeleteKeyCommand;
|
|
21
|
-
const se_DescribeKeyValueStoreCommand = async (input, context) => {
|
|
22
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
23
|
-
const headers = {};
|
|
24
|
-
b.bp("/key-value-stores/{KvsARN}");
|
|
25
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
26
|
-
let body;
|
|
27
|
-
b.m("GET").h(headers).b(body);
|
|
28
|
-
return b.build();
|
|
29
|
-
};
|
|
30
|
-
exports.se_DescribeKeyValueStoreCommand = se_DescribeKeyValueStoreCommand;
|
|
31
|
-
const se_GetKeyCommand = async (input, context) => {
|
|
32
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
33
|
-
const headers = {};
|
|
34
|
-
b.bp("/key-value-stores/{KvsARN}/keys/{Key}");
|
|
35
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
36
|
-
b.p("Key", () => input.Key, "{Key}", false);
|
|
37
|
-
let body;
|
|
38
|
-
b.m("GET").h(headers).b(body);
|
|
39
|
-
return b.build();
|
|
40
|
-
};
|
|
41
|
-
exports.se_GetKeyCommand = se_GetKeyCommand;
|
|
42
|
-
const se_ListKeysCommand = async (input, context) => {
|
|
43
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
44
|
-
const headers = {};
|
|
45
|
-
b.bp("/key-value-stores/{KvsARN}/keys");
|
|
46
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
47
|
-
const query = (0, smithy_client_1.map)({
|
|
48
|
-
[_NT]: [, input[_NT]],
|
|
49
|
-
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
50
|
-
});
|
|
51
|
-
let body;
|
|
52
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
53
|
-
return b.build();
|
|
54
|
-
};
|
|
55
|
-
exports.se_ListKeysCommand = se_ListKeysCommand;
|
|
56
|
-
const se_PutKeyCommand = async (input, context) => {
|
|
57
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
58
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
59
|
-
"content-type": "application/json",
|
|
60
|
-
[_im]: input[_IM],
|
|
61
|
-
});
|
|
62
|
-
b.bp("/key-value-stores/{KvsARN}/keys/{Key}");
|
|
63
|
-
b.p("Key", () => input.Key, "{Key}", false);
|
|
64
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
65
|
-
let body;
|
|
66
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
67
|
-
Value: [],
|
|
68
|
-
}));
|
|
69
|
-
b.m("PUT").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
exports.se_PutKeyCommand = se_PutKeyCommand;
|
|
73
|
-
const se_UpdateKeysCommand = async (input, context) => {
|
|
74
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
75
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
76
|
-
"content-type": "application/json",
|
|
77
|
-
[_im]: input[_IM],
|
|
78
|
-
});
|
|
79
|
-
b.bp("/key-value-stores/{KvsARN}/keys");
|
|
80
|
-
b.p("KvsARN", () => input.KvsARN, "{KvsARN}", false);
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
83
|
-
Deletes: (_) => (0, smithy_client_1._json)(_),
|
|
84
|
-
Puts: (_) => (0, smithy_client_1._json)(_),
|
|
85
|
-
}));
|
|
86
|
-
b.m("POST").h(headers).b(body);
|
|
87
|
-
return b.build();
|
|
88
|
-
};
|
|
89
|
-
exports.se_UpdateKeysCommand = se_UpdateKeysCommand;
|
|
90
|
-
const de_DeleteKeyCommand = async (output, context) => {
|
|
91
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
92
|
-
return de_DeleteKeyCommandError(output, context);
|
|
93
|
-
}
|
|
94
|
-
const contents = (0, smithy_client_1.map)({
|
|
95
|
-
$metadata: deserializeMetadata(output),
|
|
96
|
-
[_ET]: [, output.headers[_e]],
|
|
97
|
-
});
|
|
98
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
99
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
100
|
-
ItemCount: smithy_client_1.expectInt32,
|
|
101
|
-
TotalSizeInBytes: smithy_client_1.expectLong,
|
|
102
|
-
});
|
|
103
|
-
Object.assign(contents, doc);
|
|
104
|
-
return contents;
|
|
105
|
-
};
|
|
106
|
-
exports.de_DeleteKeyCommand = de_DeleteKeyCommand;
|
|
107
|
-
const de_DeleteKeyCommandError = async (output, context) => {
|
|
108
|
-
const parsedOutput = {
|
|
109
|
-
...output,
|
|
110
|
-
body: await parseErrorBody(output.body, context),
|
|
111
|
-
};
|
|
112
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
113
|
-
switch (errorCode) {
|
|
114
|
-
case "AccessDeniedException":
|
|
115
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
116
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
117
|
-
case "ConflictException":
|
|
118
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
119
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
120
|
-
case "InternalServerException":
|
|
121
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
122
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
123
|
-
case "ResourceNotFoundException":
|
|
124
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
125
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
126
|
-
case "ServiceQuotaExceededException":
|
|
127
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ServiceQuotaExceededException":
|
|
128
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
129
|
-
case "ValidationException":
|
|
130
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ValidationException":
|
|
131
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
132
|
-
default:
|
|
133
|
-
const parsedBody = parsedOutput.body;
|
|
134
|
-
return throwDefaultError({
|
|
135
|
-
output,
|
|
136
|
-
parsedBody,
|
|
137
|
-
errorCode,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
const de_DescribeKeyValueStoreCommand = async (output, context) => {
|
|
142
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
143
|
-
return de_DescribeKeyValueStoreCommandError(output, context);
|
|
144
|
-
}
|
|
145
|
-
const contents = (0, smithy_client_1.map)({
|
|
146
|
-
$metadata: deserializeMetadata(output),
|
|
147
|
-
[_ET]: [, output.headers[_e]],
|
|
148
|
-
});
|
|
149
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
150
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
151
|
-
Created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
152
|
-
ItemCount: smithy_client_1.expectInt32,
|
|
153
|
-
KvsARN: smithy_client_1.expectString,
|
|
154
|
-
LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
155
|
-
TotalSizeInBytes: smithy_client_1.expectLong,
|
|
156
|
-
});
|
|
157
|
-
Object.assign(contents, doc);
|
|
158
|
-
return contents;
|
|
159
|
-
};
|
|
160
|
-
exports.de_DescribeKeyValueStoreCommand = de_DescribeKeyValueStoreCommand;
|
|
161
|
-
const de_DescribeKeyValueStoreCommandError = async (output, context) => {
|
|
162
|
-
const parsedOutput = {
|
|
163
|
-
...output,
|
|
164
|
-
body: await parseErrorBody(output.body, context),
|
|
165
|
-
};
|
|
166
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
167
|
-
switch (errorCode) {
|
|
168
|
-
case "AccessDeniedException":
|
|
169
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
170
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
171
|
-
case "ConflictException":
|
|
172
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
173
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
174
|
-
case "InternalServerException":
|
|
175
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
176
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
177
|
-
case "ResourceNotFoundException":
|
|
178
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
179
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
180
|
-
default:
|
|
181
|
-
const parsedBody = parsedOutput.body;
|
|
182
|
-
return throwDefaultError({
|
|
183
|
-
output,
|
|
184
|
-
parsedBody,
|
|
185
|
-
errorCode,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
const de_GetKeyCommand = async (output, context) => {
|
|
190
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
191
|
-
return de_GetKeyCommandError(output, context);
|
|
192
|
-
}
|
|
193
|
-
const contents = (0, smithy_client_1.map)({
|
|
194
|
-
$metadata: deserializeMetadata(output),
|
|
195
|
-
});
|
|
196
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
197
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
198
|
-
ItemCount: smithy_client_1.expectInt32,
|
|
199
|
-
Key: smithy_client_1.expectString,
|
|
200
|
-
TotalSizeInBytes: smithy_client_1.expectLong,
|
|
201
|
-
Value: smithy_client_1.expectString,
|
|
202
|
-
});
|
|
203
|
-
Object.assign(contents, doc);
|
|
204
|
-
return contents;
|
|
205
|
-
};
|
|
206
|
-
exports.de_GetKeyCommand = de_GetKeyCommand;
|
|
207
|
-
const de_GetKeyCommandError = async (output, context) => {
|
|
208
|
-
const parsedOutput = {
|
|
209
|
-
...output,
|
|
210
|
-
body: await parseErrorBody(output.body, context),
|
|
211
|
-
};
|
|
212
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
213
|
-
switch (errorCode) {
|
|
214
|
-
case "AccessDeniedException":
|
|
215
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
216
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
217
|
-
case "ConflictException":
|
|
218
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
219
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
220
|
-
case "InternalServerException":
|
|
221
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
222
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
223
|
-
case "ResourceNotFoundException":
|
|
224
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
225
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
226
|
-
default:
|
|
227
|
-
const parsedBody = parsedOutput.body;
|
|
228
|
-
return throwDefaultError({
|
|
229
|
-
output,
|
|
230
|
-
parsedBody,
|
|
231
|
-
errorCode,
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
const de_ListKeysCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
-
return de_ListKeysCommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const contents = (0, smithy_client_1.map)({
|
|
240
|
-
$metadata: deserializeMetadata(output),
|
|
241
|
-
});
|
|
242
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
243
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
244
|
-
Items: smithy_client_1._json,
|
|
245
|
-
NextToken: smithy_client_1.expectString,
|
|
246
|
-
});
|
|
247
|
-
Object.assign(contents, doc);
|
|
248
|
-
return contents;
|
|
249
|
-
};
|
|
250
|
-
exports.de_ListKeysCommand = de_ListKeysCommand;
|
|
251
|
-
const de_ListKeysCommandError = async (output, context) => {
|
|
252
|
-
const parsedOutput = {
|
|
253
|
-
...output,
|
|
254
|
-
body: await parseErrorBody(output.body, context),
|
|
255
|
-
};
|
|
256
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
257
|
-
switch (errorCode) {
|
|
258
|
-
case "AccessDeniedException":
|
|
259
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
260
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
261
|
-
case "ConflictException":
|
|
262
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
263
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
264
|
-
case "InternalServerException":
|
|
265
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
266
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
267
|
-
case "ResourceNotFoundException":
|
|
268
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
269
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
270
|
-
case "ValidationException":
|
|
271
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ValidationException":
|
|
272
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
273
|
-
default:
|
|
274
|
-
const parsedBody = parsedOutput.body;
|
|
275
|
-
return throwDefaultError({
|
|
276
|
-
output,
|
|
277
|
-
parsedBody,
|
|
278
|
-
errorCode,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
const de_PutKeyCommand = async (output, context) => {
|
|
283
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
284
|
-
return de_PutKeyCommandError(output, context);
|
|
285
|
-
}
|
|
286
|
-
const contents = (0, smithy_client_1.map)({
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
[_ET]: [, output.headers[_e]],
|
|
289
|
-
});
|
|
290
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
291
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
292
|
-
ItemCount: smithy_client_1.expectInt32,
|
|
293
|
-
TotalSizeInBytes: smithy_client_1.expectLong,
|
|
294
|
-
});
|
|
295
|
-
Object.assign(contents, doc);
|
|
296
|
-
return contents;
|
|
297
|
-
};
|
|
298
|
-
exports.de_PutKeyCommand = de_PutKeyCommand;
|
|
299
|
-
const de_PutKeyCommandError = async (output, context) => {
|
|
300
|
-
const parsedOutput = {
|
|
301
|
-
...output,
|
|
302
|
-
body: await parseErrorBody(output.body, context),
|
|
303
|
-
};
|
|
304
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
305
|
-
switch (errorCode) {
|
|
306
|
-
case "AccessDeniedException":
|
|
307
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
308
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
309
|
-
case "ConflictException":
|
|
310
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
311
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
312
|
-
case "InternalServerException":
|
|
313
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
314
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
315
|
-
case "ResourceNotFoundException":
|
|
316
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
317
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
318
|
-
case "ServiceQuotaExceededException":
|
|
319
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ServiceQuotaExceededException":
|
|
320
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
321
|
-
case "ValidationException":
|
|
322
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ValidationException":
|
|
323
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
324
|
-
default:
|
|
325
|
-
const parsedBody = parsedOutput.body;
|
|
326
|
-
return throwDefaultError({
|
|
327
|
-
output,
|
|
328
|
-
parsedBody,
|
|
329
|
-
errorCode,
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
const de_UpdateKeysCommand = async (output, context) => {
|
|
334
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
335
|
-
return de_UpdateKeysCommandError(output, context);
|
|
336
|
-
}
|
|
337
|
-
const contents = (0, smithy_client_1.map)({
|
|
338
|
-
$metadata: deserializeMetadata(output),
|
|
339
|
-
[_ET]: [, output.headers[_e]],
|
|
340
|
-
});
|
|
341
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
342
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
343
|
-
ItemCount: smithy_client_1.expectInt32,
|
|
344
|
-
TotalSizeInBytes: smithy_client_1.expectLong,
|
|
345
|
-
});
|
|
346
|
-
Object.assign(contents, doc);
|
|
347
|
-
return contents;
|
|
348
|
-
};
|
|
349
|
-
exports.de_UpdateKeysCommand = de_UpdateKeysCommand;
|
|
350
|
-
const de_UpdateKeysCommandError = async (output, context) => {
|
|
351
|
-
const parsedOutput = {
|
|
352
|
-
...output,
|
|
353
|
-
body: await parseErrorBody(output.body, context),
|
|
354
|
-
};
|
|
355
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
356
|
-
switch (errorCode) {
|
|
357
|
-
case "AccessDeniedException":
|
|
358
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#AccessDeniedException":
|
|
359
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
360
|
-
case "ConflictException":
|
|
361
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ConflictException":
|
|
362
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
363
|
-
case "InternalServerException":
|
|
364
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#InternalServerException":
|
|
365
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
366
|
-
case "ResourceNotFoundException":
|
|
367
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ResourceNotFoundException":
|
|
368
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
369
|
-
case "ServiceQuotaExceededException":
|
|
370
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ServiceQuotaExceededException":
|
|
371
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
372
|
-
case "ValidationException":
|
|
373
|
-
case "com.amazonaws.cloudfrontkeyvaluestore#ValidationException":
|
|
374
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
375
|
-
default:
|
|
376
|
-
const parsedBody = parsedOutput.body;
|
|
377
|
-
return throwDefaultError({
|
|
378
|
-
output,
|
|
379
|
-
parsedBody,
|
|
380
|
-
errorCode,
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudFrontKeyValueStoreServiceException_1.CloudFrontKeyValueStoreServiceException);
|
|
385
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
386
|
-
const contents = (0, smithy_client_1.map)({});
|
|
387
|
-
const data = parsedOutput.body;
|
|
388
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
389
|
-
Message: smithy_client_1.expectString,
|
|
390
|
-
});
|
|
391
|
-
Object.assign(contents, doc);
|
|
392
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
393
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
394
|
-
...contents,
|
|
395
|
-
});
|
|
396
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
397
|
-
};
|
|
398
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
399
|
-
const contents = (0, smithy_client_1.map)({});
|
|
400
|
-
const data = parsedOutput.body;
|
|
401
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
-
Message: smithy_client_1.expectString,
|
|
403
|
-
});
|
|
404
|
-
Object.assign(contents, doc);
|
|
405
|
-
const exception = new models_0_1.ConflictException({
|
|
406
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
407
|
-
...contents,
|
|
408
|
-
});
|
|
409
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
410
|
-
};
|
|
411
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
412
|
-
const contents = (0, smithy_client_1.map)({});
|
|
413
|
-
const data = parsedOutput.body;
|
|
414
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
415
|
-
Message: smithy_client_1.expectString,
|
|
416
|
-
});
|
|
417
|
-
Object.assign(contents, doc);
|
|
418
|
-
const exception = new models_0_1.InternalServerException({
|
|
419
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
420
|
-
...contents,
|
|
421
|
-
});
|
|
422
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
423
|
-
};
|
|
424
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
425
|
-
const contents = (0, smithy_client_1.map)({});
|
|
426
|
-
const data = parsedOutput.body;
|
|
427
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
428
|
-
Message: smithy_client_1.expectString,
|
|
429
|
-
});
|
|
430
|
-
Object.assign(contents, doc);
|
|
431
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
432
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
433
|
-
...contents,
|
|
434
|
-
});
|
|
435
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
436
|
-
};
|
|
437
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
438
|
-
const contents = (0, smithy_client_1.map)({});
|
|
439
|
-
const data = parsedOutput.body;
|
|
440
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
441
|
-
Message: smithy_client_1.expectString,
|
|
442
|
-
});
|
|
443
|
-
Object.assign(contents, doc);
|
|
444
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
445
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
446
|
-
...contents,
|
|
447
|
-
});
|
|
448
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
449
|
-
};
|
|
450
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
451
|
-
const contents = (0, smithy_client_1.map)({});
|
|
452
|
-
const data = parsedOutput.body;
|
|
453
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
454
|
-
Message: smithy_client_1.expectString,
|
|
455
|
-
});
|
|
456
|
-
Object.assign(contents, doc);
|
|
457
|
-
const exception = new models_0_1.ValidationException({
|
|
458
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
459
|
-
...contents,
|
|
460
|
-
});
|
|
461
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
462
|
-
};
|
|
463
|
-
const deserializeMetadata = (output) => ({
|
|
464
|
-
httpStatusCode: output.statusCode,
|
|
465
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
466
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
467
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
468
|
-
});
|
|
469
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
470
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
471
|
-
value !== null &&
|
|
472
|
-
value !== "" &&
|
|
473
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
474
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
475
|
-
const _ET = "ETag";
|
|
476
|
-
const _IM = "IfMatch";
|
|
477
|
-
const _MR = "MaxResults";
|
|
478
|
-
const _NT = "NextToken";
|
|
479
|
-
const _e = "etag";
|
|
480
|
-
const _im = "if-match";
|
|
481
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
482
|
-
if (encoded.length) {
|
|
483
|
-
return JSON.parse(encoded);
|
|
484
|
-
}
|
|
485
|
-
return {};
|
|
486
|
-
});
|
|
487
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
488
|
-
const value = await parseBody(errorBody, context);
|
|
489
|
-
value.message = value.message ?? value.Message;
|
|
490
|
-
return value;
|
|
491
|
-
};
|
|
492
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
493
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
494
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
495
|
-
let cleanValue = rawValue;
|
|
496
|
-
if (typeof cleanValue === "number") {
|
|
497
|
-
cleanValue = cleanValue.toString();
|
|
498
|
-
}
|
|
499
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
500
|
-
cleanValue = cleanValue.split(",")[0];
|
|
501
|
-
}
|
|
502
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
503
|
-
cleanValue = cleanValue.split(":")[0];
|
|
504
|
-
}
|
|
505
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
506
|
-
cleanValue = cleanValue.split("#")[1];
|
|
507
|
-
}
|
|
508
|
-
return cleanValue;
|
|
509
|
-
};
|
|
510
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
511
|
-
if (headerKey !== undefined) {
|
|
512
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
513
|
-
}
|
|
514
|
-
if (data.code !== undefined) {
|
|
515
|
-
return sanitizeErrorCode(data.code);
|
|
516
|
-
}
|
|
517
|
-
if (data["__type"] !== undefined) {
|
|
518
|
-
return sanitizeErrorCode(data["__type"]);
|
|
519
|
-
}
|
|
520
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
|
|
4
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
6
|
const url_parser_1 = require("@smithy/url-parser");
|
|
6
7
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -16,6 +17,7 @@ const getRuntimeConfig = (config) => {
|
|
|
16
17
|
extensions: config?.extensions ?? [],
|
|
17
18
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
18
19
|
serviceId: config?.serviceId ?? "CloudFront KeyValueStore",
|
|
20
|
+
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
|
|
19
21
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
20
22
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
21
23
|
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
|
|
1
2
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
3
|
import { parseUrl } from "@smithy/url-parser";
|
|
3
4
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
@@ -13,6 +14,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
13
14
|
extensions: config?.extensions ?? [],
|
|
14
15
|
logger: config?.logger ?? new NoOpLogger(),
|
|
15
16
|
serviceId: config?.serviceId ?? "CloudFront KeyValueStore",
|
|
17
|
+
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
16
18
|
urlParser: config?.urlParser ?? parseUrl,
|
|
17
19
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
18
20
|
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
@@ -41,6 +41,6 @@ export declare const getRuntimeConfig: (config: CloudFrontKeyValueStoreClientCon
|
|
|
41
41
|
signingEscapePath?: boolean | undefined;
|
|
42
42
|
systemClockOffset?: number | undefined;
|
|
43
43
|
signingRegion?: string | undefined;
|
|
44
|
-
signerConstructor
|
|
44
|
+
signerConstructor: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
45
45
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
46
|
};
|
|
@@ -41,6 +41,6 @@ export declare const getRuntimeConfig: (config: CloudFrontKeyValueStoreClientCon
|
|
|
41
41
|
signingEscapePath?: boolean | undefined;
|
|
42
42
|
systemClockOffset?: number | undefined;
|
|
43
43
|
signingRegion?: string | undefined;
|
|
44
|
-
signerConstructor
|
|
44
|
+
signerConstructor: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
45
45
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
46
|
};
|
|
@@ -40,6 +40,6 @@ export declare const getRuntimeConfig: (config: CloudFrontKeyValueStoreClientCon
|
|
|
40
40
|
signingEscapePath?: boolean | undefined;
|
|
41
41
|
systemClockOffset?: number | undefined;
|
|
42
42
|
signingRegion?: string | undefined;
|
|
43
|
-
signerConstructor
|
|
43
|
+
signerConstructor: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
44
44
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
45
45
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
|
|
1
2
|
import { CloudFrontKeyValueStoreClientConfig } from "./CloudFrontKeyValueStoreClient";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
@@ -13,6 +14,7 @@ export declare const getRuntimeConfig: (config: CloudFrontKeyValueStoreClientCon
|
|
|
13
14
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
14
15
|
logger: import("@smithy/types").Logger;
|
|
15
16
|
serviceId: string;
|
|
17
|
+
signerConstructor: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | typeof SignatureV4MultiRegion;
|
|
16
18
|
urlParser: import("@smithy/types").UrlParser;
|
|
17
19
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
18
20
|
utf8Encoder: import("@smithy/types").Encoder;
|
|
@@ -89,11 +89,11 @@ export declare const getRuntimeConfig: (
|
|
|
89
89
|
signingEscapePath?: boolean | undefined;
|
|
90
90
|
systemClockOffset?: number | undefined;
|
|
91
91
|
signingRegion?: string | undefined;
|
|
92
|
-
signerConstructor
|
|
92
|
+
signerConstructor:
|
|
93
93
|
| (new (
|
|
94
94
|
options: import("@smithy/signature-v4").SignatureV4Init &
|
|
95
95
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
96
96
|
) => import("@smithy/types").RequestSigner)
|
|
97
|
-
|
|
|
97
|
+
| typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
98
98
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
99
99
|
};
|
|
@@ -89,11 +89,11 @@ export declare const getRuntimeConfig: (
|
|
|
89
89
|
signingEscapePath?: boolean | undefined;
|
|
90
90
|
systemClockOffset?: number | undefined;
|
|
91
91
|
signingRegion?: string | undefined;
|
|
92
|
-
signerConstructor
|
|
92
|
+
signerConstructor:
|
|
93
93
|
| (new (
|
|
94
94
|
options: import("@smithy/signature-v4").SignatureV4Init &
|
|
95
95
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
96
96
|
) => import("@smithy/types").RequestSigner)
|
|
97
|
-
|
|
|
97
|
+
| typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
98
98
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
99
99
|
};
|
|
@@ -80,11 +80,11 @@ export declare const getRuntimeConfig: (
|
|
|
80
80
|
signingEscapePath?: boolean | undefined;
|
|
81
81
|
systemClockOffset?: number | undefined;
|
|
82
82
|
signingRegion?: string | undefined;
|
|
83
|
-
signerConstructor
|
|
83
|
+
signerConstructor:
|
|
84
84
|
| (new (
|
|
85
85
|
options: import("@smithy/signature-v4").SignatureV4Init &
|
|
86
86
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
87
87
|
) => import("@smithy/types").RequestSigner)
|
|
88
|
-
|
|
|
88
|
+
| typeof import("@aws-sdk/signature-v4-multi-region").SignatureV4MultiRegion;
|
|
89
89
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
90
90
|
};
|