@aws-sdk/client-secrets-manager 3.926.0 → 3.928.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/index.js +808 -1068
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/SecretsManagerClient.js +2 -0
- package/dist-es/commands/BatchGetSecretValueCommand.js +3 -10
- package/dist-es/commands/CancelRotateSecretCommand.js +3 -9
- package/dist-es/commands/CreateSecretCommand.js +3 -10
- package/dist-es/commands/DeleteResourcePolicyCommand.js +3 -9
- package/dist-es/commands/DeleteSecretCommand.js +3 -9
- package/dist-es/commands/DescribeSecretCommand.js +3 -9
- package/dist-es/commands/GetRandomPasswordCommand.js +3 -10
- package/dist-es/commands/GetResourcePolicyCommand.js +3 -9
- package/dist-es/commands/GetSecretValueCommand.js +3 -10
- package/dist-es/commands/ListSecretVersionIdsCommand.js +3 -9
- package/dist-es/commands/ListSecretsCommand.js +3 -9
- package/dist-es/commands/PutResourcePolicyCommand.js +3 -9
- package/dist-es/commands/PutSecretValueCommand.js +3 -10
- package/dist-es/commands/RemoveRegionsFromReplicationCommand.js +3 -9
- package/dist-es/commands/ReplicateSecretToRegionsCommand.js +3 -9
- package/dist-es/commands/RestoreSecretCommand.js +3 -9
- package/dist-es/commands/RotateSecretCommand.js +3 -9
- package/dist-es/commands/StopReplicationToReplicaCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/commands/UpdateSecretCommand.js +3 -10
- package/dist-es/commands/UpdateSecretVersionStageCommand.js +3 -9
- package/dist-es/commands/ValidateResourcePolicyCommand.js +3 -9
- package/dist-es/models/models_0.js +0 -35
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +731 -0
- package/dist-types/SecretsManagerClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -28
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +112 -0
- package/dist-types/ts3.4/SecretsManagerClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -21
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +119 -0
- package/package.json +5 -6
- package/dist-es/protocols/Aws_json1_1.js +0 -834
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -209
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -281
|
@@ -1,834 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { DecryptionFailure, EncryptionFailure, InternalServiceError, InvalidNextTokenException, InvalidParameterException, InvalidRequestException, LimitExceededException, MalformedPolicyDocumentException, PreconditionNotMetException, PublicPolicyException, ResourceExistsException, ResourceNotFoundException, } from "../models/models_0";
|
|
6
|
-
import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException";
|
|
7
|
-
export const se_BatchGetSecretValueCommand = async (input, context) => {
|
|
8
|
-
const headers = sharedHeaders("BatchGetSecretValue");
|
|
9
|
-
let body;
|
|
10
|
-
body = JSON.stringify(_json(input));
|
|
11
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
-
};
|
|
13
|
-
export const se_CancelRotateSecretCommand = async (input, context) => {
|
|
14
|
-
const headers = sharedHeaders("CancelRotateSecret");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify(_json(input));
|
|
17
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
-
};
|
|
19
|
-
export const se_CreateSecretCommand = async (input, context) => {
|
|
20
|
-
const headers = sharedHeaders("CreateSecret");
|
|
21
|
-
let body;
|
|
22
|
-
body = JSON.stringify(se_CreateSecretRequest(input, context));
|
|
23
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
|
-
};
|
|
25
|
-
export const se_DeleteResourcePolicyCommand = async (input, context) => {
|
|
26
|
-
const headers = sharedHeaders("DeleteResourcePolicy");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify(_json(input));
|
|
29
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
-
};
|
|
31
|
-
export const se_DeleteSecretCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("DeleteSecret");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(_json(input));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
export const se_DescribeSecretCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("DescribeSecret");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify(_json(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
export const se_GetRandomPasswordCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("GetRandomPassword");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify(_json(input));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
export const se_GetResourcePolicyCommand = async (input, context) => {
|
|
50
|
-
const headers = sharedHeaders("GetResourcePolicy");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(_json(input));
|
|
53
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
-
};
|
|
55
|
-
export const se_GetSecretValueCommand = async (input, context) => {
|
|
56
|
-
const headers = sharedHeaders("GetSecretValue");
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify(_json(input));
|
|
59
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
60
|
-
};
|
|
61
|
-
export const se_ListSecretsCommand = async (input, context) => {
|
|
62
|
-
const headers = sharedHeaders("ListSecrets");
|
|
63
|
-
let body;
|
|
64
|
-
body = JSON.stringify(_json(input));
|
|
65
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
-
};
|
|
67
|
-
export const se_ListSecretVersionIdsCommand = async (input, context) => {
|
|
68
|
-
const headers = sharedHeaders("ListSecretVersionIds");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify(_json(input));
|
|
71
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
72
|
-
};
|
|
73
|
-
export const se_PutResourcePolicyCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("PutResourcePolicy");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify(_json(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
export const se_PutSecretValueCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("PutSecretValue");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify(se_PutSecretValueRequest(input, context));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
export const se_RemoveRegionsFromReplicationCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("RemoveRegionsFromReplication");
|
|
87
|
-
let body;
|
|
88
|
-
body = JSON.stringify(_json(input));
|
|
89
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
-
};
|
|
91
|
-
export const se_ReplicateSecretToRegionsCommand = async (input, context) => {
|
|
92
|
-
const headers = sharedHeaders("ReplicateSecretToRegions");
|
|
93
|
-
let body;
|
|
94
|
-
body = JSON.stringify(_json(input));
|
|
95
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
|
-
};
|
|
97
|
-
export const se_RestoreSecretCommand = async (input, context) => {
|
|
98
|
-
const headers = sharedHeaders("RestoreSecret");
|
|
99
|
-
let body;
|
|
100
|
-
body = JSON.stringify(_json(input));
|
|
101
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
102
|
-
};
|
|
103
|
-
export const se_RotateSecretCommand = async (input, context) => {
|
|
104
|
-
const headers = sharedHeaders("RotateSecret");
|
|
105
|
-
let body;
|
|
106
|
-
body = JSON.stringify(se_RotateSecretRequest(input, context));
|
|
107
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
108
|
-
};
|
|
109
|
-
export const se_StopReplicationToReplicaCommand = async (input, context) => {
|
|
110
|
-
const headers = sharedHeaders("StopReplicationToReplica");
|
|
111
|
-
let body;
|
|
112
|
-
body = JSON.stringify(_json(input));
|
|
113
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
-
};
|
|
115
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
116
|
-
const headers = sharedHeaders("TagResource");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify(_json(input));
|
|
119
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
120
|
-
};
|
|
121
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
122
|
-
const headers = sharedHeaders("UntagResource");
|
|
123
|
-
let body;
|
|
124
|
-
body = JSON.stringify(_json(input));
|
|
125
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
-
};
|
|
127
|
-
export const se_UpdateSecretCommand = async (input, context) => {
|
|
128
|
-
const headers = sharedHeaders("UpdateSecret");
|
|
129
|
-
let body;
|
|
130
|
-
body = JSON.stringify(se_UpdateSecretRequest(input, context));
|
|
131
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
132
|
-
};
|
|
133
|
-
export const se_UpdateSecretVersionStageCommand = async (input, context) => {
|
|
134
|
-
const headers = sharedHeaders("UpdateSecretVersionStage");
|
|
135
|
-
let body;
|
|
136
|
-
body = JSON.stringify(_json(input));
|
|
137
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
138
|
-
};
|
|
139
|
-
export const se_ValidateResourcePolicyCommand = async (input, context) => {
|
|
140
|
-
const headers = sharedHeaders("ValidateResourcePolicy");
|
|
141
|
-
let body;
|
|
142
|
-
body = JSON.stringify(_json(input));
|
|
143
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
144
|
-
};
|
|
145
|
-
export const de_BatchGetSecretValueCommand = async (output, context) => {
|
|
146
|
-
if (output.statusCode >= 300) {
|
|
147
|
-
return de_CommandError(output, context);
|
|
148
|
-
}
|
|
149
|
-
const data = await parseBody(output.body, context);
|
|
150
|
-
let contents = {};
|
|
151
|
-
contents = de_BatchGetSecretValueResponse(data, context);
|
|
152
|
-
const response = {
|
|
153
|
-
$metadata: deserializeMetadata(output),
|
|
154
|
-
...contents,
|
|
155
|
-
};
|
|
156
|
-
return response;
|
|
157
|
-
};
|
|
158
|
-
export const de_CancelRotateSecretCommand = async (output, context) => {
|
|
159
|
-
if (output.statusCode >= 300) {
|
|
160
|
-
return de_CommandError(output, context);
|
|
161
|
-
}
|
|
162
|
-
const data = await parseBody(output.body, context);
|
|
163
|
-
let contents = {};
|
|
164
|
-
contents = _json(data);
|
|
165
|
-
const response = {
|
|
166
|
-
$metadata: deserializeMetadata(output),
|
|
167
|
-
...contents,
|
|
168
|
-
};
|
|
169
|
-
return response;
|
|
170
|
-
};
|
|
171
|
-
export const de_CreateSecretCommand = async (output, context) => {
|
|
172
|
-
if (output.statusCode >= 300) {
|
|
173
|
-
return de_CommandError(output, context);
|
|
174
|
-
}
|
|
175
|
-
const data = await parseBody(output.body, context);
|
|
176
|
-
let contents = {};
|
|
177
|
-
contents = de_CreateSecretResponse(data, context);
|
|
178
|
-
const response = {
|
|
179
|
-
$metadata: deserializeMetadata(output),
|
|
180
|
-
...contents,
|
|
181
|
-
};
|
|
182
|
-
return response;
|
|
183
|
-
};
|
|
184
|
-
export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
185
|
-
if (output.statusCode >= 300) {
|
|
186
|
-
return de_CommandError(output, context);
|
|
187
|
-
}
|
|
188
|
-
const data = await parseBody(output.body, context);
|
|
189
|
-
let contents = {};
|
|
190
|
-
contents = _json(data);
|
|
191
|
-
const response = {
|
|
192
|
-
$metadata: deserializeMetadata(output),
|
|
193
|
-
...contents,
|
|
194
|
-
};
|
|
195
|
-
return response;
|
|
196
|
-
};
|
|
197
|
-
export const de_DeleteSecretCommand = async (output, context) => {
|
|
198
|
-
if (output.statusCode >= 300) {
|
|
199
|
-
return de_CommandError(output, context);
|
|
200
|
-
}
|
|
201
|
-
const data = await parseBody(output.body, context);
|
|
202
|
-
let contents = {};
|
|
203
|
-
contents = de_DeleteSecretResponse(data, context);
|
|
204
|
-
const response = {
|
|
205
|
-
$metadata: deserializeMetadata(output),
|
|
206
|
-
...contents,
|
|
207
|
-
};
|
|
208
|
-
return response;
|
|
209
|
-
};
|
|
210
|
-
export const de_DescribeSecretCommand = async (output, context) => {
|
|
211
|
-
if (output.statusCode >= 300) {
|
|
212
|
-
return de_CommandError(output, context);
|
|
213
|
-
}
|
|
214
|
-
const data = await parseBody(output.body, context);
|
|
215
|
-
let contents = {};
|
|
216
|
-
contents = de_DescribeSecretResponse(data, context);
|
|
217
|
-
const response = {
|
|
218
|
-
$metadata: deserializeMetadata(output),
|
|
219
|
-
...contents,
|
|
220
|
-
};
|
|
221
|
-
return response;
|
|
222
|
-
};
|
|
223
|
-
export const de_GetRandomPasswordCommand = async (output, context) => {
|
|
224
|
-
if (output.statusCode >= 300) {
|
|
225
|
-
return de_CommandError(output, context);
|
|
226
|
-
}
|
|
227
|
-
const data = await parseBody(output.body, context);
|
|
228
|
-
let contents = {};
|
|
229
|
-
contents = _json(data);
|
|
230
|
-
const response = {
|
|
231
|
-
$metadata: deserializeMetadata(output),
|
|
232
|
-
...contents,
|
|
233
|
-
};
|
|
234
|
-
return response;
|
|
235
|
-
};
|
|
236
|
-
export const de_GetResourcePolicyCommand = async (output, context) => {
|
|
237
|
-
if (output.statusCode >= 300) {
|
|
238
|
-
return de_CommandError(output, context);
|
|
239
|
-
}
|
|
240
|
-
const data = await parseBody(output.body, context);
|
|
241
|
-
let contents = {};
|
|
242
|
-
contents = _json(data);
|
|
243
|
-
const response = {
|
|
244
|
-
$metadata: deserializeMetadata(output),
|
|
245
|
-
...contents,
|
|
246
|
-
};
|
|
247
|
-
return response;
|
|
248
|
-
};
|
|
249
|
-
export const de_GetSecretValueCommand = async (output, context) => {
|
|
250
|
-
if (output.statusCode >= 300) {
|
|
251
|
-
return de_CommandError(output, context);
|
|
252
|
-
}
|
|
253
|
-
const data = await parseBody(output.body, context);
|
|
254
|
-
let contents = {};
|
|
255
|
-
contents = de_GetSecretValueResponse(data, context);
|
|
256
|
-
const response = {
|
|
257
|
-
$metadata: deserializeMetadata(output),
|
|
258
|
-
...contents,
|
|
259
|
-
};
|
|
260
|
-
return response;
|
|
261
|
-
};
|
|
262
|
-
export const de_ListSecretsCommand = async (output, context) => {
|
|
263
|
-
if (output.statusCode >= 300) {
|
|
264
|
-
return de_CommandError(output, context);
|
|
265
|
-
}
|
|
266
|
-
const data = await parseBody(output.body, context);
|
|
267
|
-
let contents = {};
|
|
268
|
-
contents = de_ListSecretsResponse(data, context);
|
|
269
|
-
const response = {
|
|
270
|
-
$metadata: deserializeMetadata(output),
|
|
271
|
-
...contents,
|
|
272
|
-
};
|
|
273
|
-
return response;
|
|
274
|
-
};
|
|
275
|
-
export const de_ListSecretVersionIdsCommand = async (output, context) => {
|
|
276
|
-
if (output.statusCode >= 300) {
|
|
277
|
-
return de_CommandError(output, context);
|
|
278
|
-
}
|
|
279
|
-
const data = await parseBody(output.body, context);
|
|
280
|
-
let contents = {};
|
|
281
|
-
contents = de_ListSecretVersionIdsResponse(data, context);
|
|
282
|
-
const response = {
|
|
283
|
-
$metadata: deserializeMetadata(output),
|
|
284
|
-
...contents,
|
|
285
|
-
};
|
|
286
|
-
return response;
|
|
287
|
-
};
|
|
288
|
-
export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
289
|
-
if (output.statusCode >= 300) {
|
|
290
|
-
return de_CommandError(output, context);
|
|
291
|
-
}
|
|
292
|
-
const data = await parseBody(output.body, context);
|
|
293
|
-
let contents = {};
|
|
294
|
-
contents = _json(data);
|
|
295
|
-
const response = {
|
|
296
|
-
$metadata: deserializeMetadata(output),
|
|
297
|
-
...contents,
|
|
298
|
-
};
|
|
299
|
-
return response;
|
|
300
|
-
};
|
|
301
|
-
export const de_PutSecretValueCommand = async (output, context) => {
|
|
302
|
-
if (output.statusCode >= 300) {
|
|
303
|
-
return de_CommandError(output, context);
|
|
304
|
-
}
|
|
305
|
-
const data = await parseBody(output.body, context);
|
|
306
|
-
let contents = {};
|
|
307
|
-
contents = _json(data);
|
|
308
|
-
const response = {
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
...contents,
|
|
311
|
-
};
|
|
312
|
-
return response;
|
|
313
|
-
};
|
|
314
|
-
export const de_RemoveRegionsFromReplicationCommand = async (output, context) => {
|
|
315
|
-
if (output.statusCode >= 300) {
|
|
316
|
-
return de_CommandError(output, context);
|
|
317
|
-
}
|
|
318
|
-
const data = await parseBody(output.body, context);
|
|
319
|
-
let contents = {};
|
|
320
|
-
contents = de_RemoveRegionsFromReplicationResponse(data, context);
|
|
321
|
-
const response = {
|
|
322
|
-
$metadata: deserializeMetadata(output),
|
|
323
|
-
...contents,
|
|
324
|
-
};
|
|
325
|
-
return response;
|
|
326
|
-
};
|
|
327
|
-
export const de_ReplicateSecretToRegionsCommand = async (output, context) => {
|
|
328
|
-
if (output.statusCode >= 300) {
|
|
329
|
-
return de_CommandError(output, context);
|
|
330
|
-
}
|
|
331
|
-
const data = await parseBody(output.body, context);
|
|
332
|
-
let contents = {};
|
|
333
|
-
contents = de_ReplicateSecretToRegionsResponse(data, context);
|
|
334
|
-
const response = {
|
|
335
|
-
$metadata: deserializeMetadata(output),
|
|
336
|
-
...contents,
|
|
337
|
-
};
|
|
338
|
-
return response;
|
|
339
|
-
};
|
|
340
|
-
export const de_RestoreSecretCommand = async (output, context) => {
|
|
341
|
-
if (output.statusCode >= 300) {
|
|
342
|
-
return de_CommandError(output, context);
|
|
343
|
-
}
|
|
344
|
-
const data = await parseBody(output.body, context);
|
|
345
|
-
let contents = {};
|
|
346
|
-
contents = _json(data);
|
|
347
|
-
const response = {
|
|
348
|
-
$metadata: deserializeMetadata(output),
|
|
349
|
-
...contents,
|
|
350
|
-
};
|
|
351
|
-
return response;
|
|
352
|
-
};
|
|
353
|
-
export const de_RotateSecretCommand = async (output, context) => {
|
|
354
|
-
if (output.statusCode >= 300) {
|
|
355
|
-
return de_CommandError(output, context);
|
|
356
|
-
}
|
|
357
|
-
const data = await parseBody(output.body, context);
|
|
358
|
-
let contents = {};
|
|
359
|
-
contents = _json(data);
|
|
360
|
-
const response = {
|
|
361
|
-
$metadata: deserializeMetadata(output),
|
|
362
|
-
...contents,
|
|
363
|
-
};
|
|
364
|
-
return response;
|
|
365
|
-
};
|
|
366
|
-
export const de_StopReplicationToReplicaCommand = async (output, context) => {
|
|
367
|
-
if (output.statusCode >= 300) {
|
|
368
|
-
return de_CommandError(output, context);
|
|
369
|
-
}
|
|
370
|
-
const data = await parseBody(output.body, context);
|
|
371
|
-
let contents = {};
|
|
372
|
-
contents = _json(data);
|
|
373
|
-
const response = {
|
|
374
|
-
$metadata: deserializeMetadata(output),
|
|
375
|
-
...contents,
|
|
376
|
-
};
|
|
377
|
-
return response;
|
|
378
|
-
};
|
|
379
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
380
|
-
if (output.statusCode >= 300) {
|
|
381
|
-
return de_CommandError(output, context);
|
|
382
|
-
}
|
|
383
|
-
await collectBody(output.body, context);
|
|
384
|
-
const response = {
|
|
385
|
-
$metadata: deserializeMetadata(output),
|
|
386
|
-
};
|
|
387
|
-
return response;
|
|
388
|
-
};
|
|
389
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
390
|
-
if (output.statusCode >= 300) {
|
|
391
|
-
return de_CommandError(output, context);
|
|
392
|
-
}
|
|
393
|
-
await collectBody(output.body, context);
|
|
394
|
-
const response = {
|
|
395
|
-
$metadata: deserializeMetadata(output),
|
|
396
|
-
};
|
|
397
|
-
return response;
|
|
398
|
-
};
|
|
399
|
-
export const de_UpdateSecretCommand = async (output, context) => {
|
|
400
|
-
if (output.statusCode >= 300) {
|
|
401
|
-
return de_CommandError(output, context);
|
|
402
|
-
}
|
|
403
|
-
const data = await parseBody(output.body, context);
|
|
404
|
-
let contents = {};
|
|
405
|
-
contents = _json(data);
|
|
406
|
-
const response = {
|
|
407
|
-
$metadata: deserializeMetadata(output),
|
|
408
|
-
...contents,
|
|
409
|
-
};
|
|
410
|
-
return response;
|
|
411
|
-
};
|
|
412
|
-
export const de_UpdateSecretVersionStageCommand = async (output, context) => {
|
|
413
|
-
if (output.statusCode >= 300) {
|
|
414
|
-
return de_CommandError(output, context);
|
|
415
|
-
}
|
|
416
|
-
const data = await parseBody(output.body, context);
|
|
417
|
-
let contents = {};
|
|
418
|
-
contents = _json(data);
|
|
419
|
-
const response = {
|
|
420
|
-
$metadata: deserializeMetadata(output),
|
|
421
|
-
...contents,
|
|
422
|
-
};
|
|
423
|
-
return response;
|
|
424
|
-
};
|
|
425
|
-
export const de_ValidateResourcePolicyCommand = async (output, context) => {
|
|
426
|
-
if (output.statusCode >= 300) {
|
|
427
|
-
return de_CommandError(output, context);
|
|
428
|
-
}
|
|
429
|
-
const data = await parseBody(output.body, context);
|
|
430
|
-
let contents = {};
|
|
431
|
-
contents = _json(data);
|
|
432
|
-
const response = {
|
|
433
|
-
$metadata: deserializeMetadata(output),
|
|
434
|
-
...contents,
|
|
435
|
-
};
|
|
436
|
-
return response;
|
|
437
|
-
};
|
|
438
|
-
const de_CommandError = async (output, context) => {
|
|
439
|
-
const parsedOutput = {
|
|
440
|
-
...output,
|
|
441
|
-
body: await parseErrorBody(output.body, context),
|
|
442
|
-
};
|
|
443
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
444
|
-
switch (errorCode) {
|
|
445
|
-
case "DecryptionFailure":
|
|
446
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
447
|
-
throw await de_DecryptionFailureRes(parsedOutput, context);
|
|
448
|
-
case "InternalServiceError":
|
|
449
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
450
|
-
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
451
|
-
case "InvalidNextTokenException":
|
|
452
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
453
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
454
|
-
case "InvalidParameterException":
|
|
455
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
456
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
457
|
-
case "InvalidRequestException":
|
|
458
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
459
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
460
|
-
case "ResourceNotFoundException":
|
|
461
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
462
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
463
|
-
case "EncryptionFailure":
|
|
464
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
465
|
-
throw await de_EncryptionFailureRes(parsedOutput, context);
|
|
466
|
-
case "LimitExceededException":
|
|
467
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
468
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
469
|
-
case "MalformedPolicyDocumentException":
|
|
470
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
471
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
472
|
-
case "PreconditionNotMetException":
|
|
473
|
-
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
474
|
-
throw await de_PreconditionNotMetExceptionRes(parsedOutput, context);
|
|
475
|
-
case "ResourceExistsException":
|
|
476
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
477
|
-
throw await de_ResourceExistsExceptionRes(parsedOutput, context);
|
|
478
|
-
case "PublicPolicyException":
|
|
479
|
-
case "com.amazonaws.secretsmanager#PublicPolicyException":
|
|
480
|
-
throw await de_PublicPolicyExceptionRes(parsedOutput, context);
|
|
481
|
-
default:
|
|
482
|
-
const parsedBody = parsedOutput.body;
|
|
483
|
-
return throwDefaultError({
|
|
484
|
-
output,
|
|
485
|
-
parsedBody,
|
|
486
|
-
errorCode,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
const de_DecryptionFailureRes = async (parsedOutput, context) => {
|
|
491
|
-
const body = parsedOutput.body;
|
|
492
|
-
const deserialized = _json(body);
|
|
493
|
-
const exception = new DecryptionFailure({
|
|
494
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
495
|
-
...deserialized,
|
|
496
|
-
});
|
|
497
|
-
return __decorateServiceException(exception, body);
|
|
498
|
-
};
|
|
499
|
-
const de_EncryptionFailureRes = async (parsedOutput, context) => {
|
|
500
|
-
const body = parsedOutput.body;
|
|
501
|
-
const deserialized = _json(body);
|
|
502
|
-
const exception = new EncryptionFailure({
|
|
503
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
504
|
-
...deserialized,
|
|
505
|
-
});
|
|
506
|
-
return __decorateServiceException(exception, body);
|
|
507
|
-
};
|
|
508
|
-
const de_InternalServiceErrorRes = async (parsedOutput, context) => {
|
|
509
|
-
const body = parsedOutput.body;
|
|
510
|
-
const deserialized = _json(body);
|
|
511
|
-
const exception = new InternalServiceError({
|
|
512
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
-
...deserialized,
|
|
514
|
-
});
|
|
515
|
-
return __decorateServiceException(exception, body);
|
|
516
|
-
};
|
|
517
|
-
const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
|
|
518
|
-
const body = parsedOutput.body;
|
|
519
|
-
const deserialized = _json(body);
|
|
520
|
-
const exception = new InvalidNextTokenException({
|
|
521
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
522
|
-
...deserialized,
|
|
523
|
-
});
|
|
524
|
-
return __decorateServiceException(exception, body);
|
|
525
|
-
};
|
|
526
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
527
|
-
const body = parsedOutput.body;
|
|
528
|
-
const deserialized = _json(body);
|
|
529
|
-
const exception = new InvalidParameterException({
|
|
530
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
531
|
-
...deserialized,
|
|
532
|
-
});
|
|
533
|
-
return __decorateServiceException(exception, body);
|
|
534
|
-
};
|
|
535
|
-
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
536
|
-
const body = parsedOutput.body;
|
|
537
|
-
const deserialized = _json(body);
|
|
538
|
-
const exception = new InvalidRequestException({
|
|
539
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
540
|
-
...deserialized,
|
|
541
|
-
});
|
|
542
|
-
return __decorateServiceException(exception, body);
|
|
543
|
-
};
|
|
544
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
545
|
-
const body = parsedOutput.body;
|
|
546
|
-
const deserialized = _json(body);
|
|
547
|
-
const exception = new LimitExceededException({
|
|
548
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
549
|
-
...deserialized,
|
|
550
|
-
});
|
|
551
|
-
return __decorateServiceException(exception, body);
|
|
552
|
-
};
|
|
553
|
-
const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
554
|
-
const body = parsedOutput.body;
|
|
555
|
-
const deserialized = _json(body);
|
|
556
|
-
const exception = new MalformedPolicyDocumentException({
|
|
557
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
558
|
-
...deserialized,
|
|
559
|
-
});
|
|
560
|
-
return __decorateServiceException(exception, body);
|
|
561
|
-
};
|
|
562
|
-
const de_PreconditionNotMetExceptionRes = async (parsedOutput, context) => {
|
|
563
|
-
const body = parsedOutput.body;
|
|
564
|
-
const deserialized = _json(body);
|
|
565
|
-
const exception = new PreconditionNotMetException({
|
|
566
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
567
|
-
...deserialized,
|
|
568
|
-
});
|
|
569
|
-
return __decorateServiceException(exception, body);
|
|
570
|
-
};
|
|
571
|
-
const de_PublicPolicyExceptionRes = async (parsedOutput, context) => {
|
|
572
|
-
const body = parsedOutput.body;
|
|
573
|
-
const deserialized = _json(body);
|
|
574
|
-
const exception = new PublicPolicyException({
|
|
575
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
576
|
-
...deserialized,
|
|
577
|
-
});
|
|
578
|
-
return __decorateServiceException(exception, body);
|
|
579
|
-
};
|
|
580
|
-
const de_ResourceExistsExceptionRes = async (parsedOutput, context) => {
|
|
581
|
-
const body = parsedOutput.body;
|
|
582
|
-
const deserialized = _json(body);
|
|
583
|
-
const exception = new ResourceExistsException({
|
|
584
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
585
|
-
...deserialized,
|
|
586
|
-
});
|
|
587
|
-
return __decorateServiceException(exception, body);
|
|
588
|
-
};
|
|
589
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
590
|
-
const body = parsedOutput.body;
|
|
591
|
-
const deserialized = _json(body);
|
|
592
|
-
const exception = new ResourceNotFoundException({
|
|
593
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
594
|
-
...deserialized,
|
|
595
|
-
});
|
|
596
|
-
return __decorateServiceException(exception, body);
|
|
597
|
-
};
|
|
598
|
-
const se_CreateSecretRequest = (input, context) => {
|
|
599
|
-
return take(input, {
|
|
600
|
-
AddReplicaRegions: _json,
|
|
601
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
602
|
-
Description: [],
|
|
603
|
-
ForceOverwriteReplicaSecret: [],
|
|
604
|
-
KmsKeyId: [],
|
|
605
|
-
Name: [],
|
|
606
|
-
SecretBinary: context.base64Encoder,
|
|
607
|
-
SecretString: [],
|
|
608
|
-
Tags: _json,
|
|
609
|
-
});
|
|
610
|
-
};
|
|
611
|
-
const se_PutSecretValueRequest = (input, context) => {
|
|
612
|
-
return take(input, {
|
|
613
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
614
|
-
RotationToken: [],
|
|
615
|
-
SecretBinary: context.base64Encoder,
|
|
616
|
-
SecretId: [],
|
|
617
|
-
SecretString: [],
|
|
618
|
-
VersionStages: _json,
|
|
619
|
-
});
|
|
620
|
-
};
|
|
621
|
-
const se_RotateSecretRequest = (input, context) => {
|
|
622
|
-
return take(input, {
|
|
623
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
624
|
-
RotateImmediately: [],
|
|
625
|
-
RotationLambdaARN: [],
|
|
626
|
-
RotationRules: _json,
|
|
627
|
-
SecretId: [],
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
const se_UpdateSecretRequest = (input, context) => {
|
|
631
|
-
return take(input, {
|
|
632
|
-
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
633
|
-
Description: [],
|
|
634
|
-
KmsKeyId: [],
|
|
635
|
-
SecretBinary: context.base64Encoder,
|
|
636
|
-
SecretId: [],
|
|
637
|
-
SecretString: [],
|
|
638
|
-
});
|
|
639
|
-
};
|
|
640
|
-
const de_BatchGetSecretValueResponse = (output, context) => {
|
|
641
|
-
return take(output, {
|
|
642
|
-
Errors: _json,
|
|
643
|
-
NextToken: __expectString,
|
|
644
|
-
SecretValues: (_) => de_SecretValuesType(_, context),
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
const de_CreateSecretResponse = (output, context) => {
|
|
648
|
-
return take(output, {
|
|
649
|
-
ARN: __expectString,
|
|
650
|
-
Name: __expectString,
|
|
651
|
-
ReplicationStatus: (_) => de_ReplicationStatusListType(_, context),
|
|
652
|
-
VersionId: __expectString,
|
|
653
|
-
});
|
|
654
|
-
};
|
|
655
|
-
const de_DeleteSecretResponse = (output, context) => {
|
|
656
|
-
return take(output, {
|
|
657
|
-
ARN: __expectString,
|
|
658
|
-
DeletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
659
|
-
Name: __expectString,
|
|
660
|
-
});
|
|
661
|
-
};
|
|
662
|
-
const de_DescribeSecretResponse = (output, context) => {
|
|
663
|
-
return take(output, {
|
|
664
|
-
ARN: __expectString,
|
|
665
|
-
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
666
|
-
DeletedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
667
|
-
Description: __expectString,
|
|
668
|
-
KmsKeyId: __expectString,
|
|
669
|
-
LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
670
|
-
LastChangedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
671
|
-
LastRotatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
672
|
-
Name: __expectString,
|
|
673
|
-
NextRotationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
674
|
-
OwningService: __expectString,
|
|
675
|
-
PrimaryRegion: __expectString,
|
|
676
|
-
ReplicationStatus: (_) => de_ReplicationStatusListType(_, context),
|
|
677
|
-
RotationEnabled: __expectBoolean,
|
|
678
|
-
RotationLambdaARN: __expectString,
|
|
679
|
-
RotationRules: _json,
|
|
680
|
-
Tags: _json,
|
|
681
|
-
VersionIdsToStages: _json,
|
|
682
|
-
});
|
|
683
|
-
};
|
|
684
|
-
const de_GetSecretValueResponse = (output, context) => {
|
|
685
|
-
return take(output, {
|
|
686
|
-
ARN: __expectString,
|
|
687
|
-
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
688
|
-
Name: __expectString,
|
|
689
|
-
SecretBinary: context.base64Decoder,
|
|
690
|
-
SecretString: __expectString,
|
|
691
|
-
VersionId: __expectString,
|
|
692
|
-
VersionStages: _json,
|
|
693
|
-
});
|
|
694
|
-
};
|
|
695
|
-
const de_ListSecretsResponse = (output, context) => {
|
|
696
|
-
return take(output, {
|
|
697
|
-
NextToken: __expectString,
|
|
698
|
-
SecretList: (_) => de_SecretListType(_, context),
|
|
699
|
-
});
|
|
700
|
-
};
|
|
701
|
-
const de_ListSecretVersionIdsResponse = (output, context) => {
|
|
702
|
-
return take(output, {
|
|
703
|
-
ARN: __expectString,
|
|
704
|
-
Name: __expectString,
|
|
705
|
-
NextToken: __expectString,
|
|
706
|
-
Versions: (_) => de_SecretVersionsListType(_, context),
|
|
707
|
-
});
|
|
708
|
-
};
|
|
709
|
-
const de_RemoveRegionsFromReplicationResponse = (output, context) => {
|
|
710
|
-
return take(output, {
|
|
711
|
-
ARN: __expectString,
|
|
712
|
-
ReplicationStatus: (_) => de_ReplicationStatusListType(_, context),
|
|
713
|
-
});
|
|
714
|
-
};
|
|
715
|
-
const de_ReplicateSecretToRegionsResponse = (output, context) => {
|
|
716
|
-
return take(output, {
|
|
717
|
-
ARN: __expectString,
|
|
718
|
-
ReplicationStatus: (_) => de_ReplicationStatusListType(_, context),
|
|
719
|
-
});
|
|
720
|
-
};
|
|
721
|
-
const de_ReplicationStatusListType = (output, context) => {
|
|
722
|
-
const retVal = (output || [])
|
|
723
|
-
.filter((e) => e != null)
|
|
724
|
-
.map((entry) => {
|
|
725
|
-
return de_ReplicationStatusType(entry, context);
|
|
726
|
-
});
|
|
727
|
-
return retVal;
|
|
728
|
-
};
|
|
729
|
-
const de_ReplicationStatusType = (output, context) => {
|
|
730
|
-
return take(output, {
|
|
731
|
-
KmsKeyId: __expectString,
|
|
732
|
-
LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
733
|
-
Region: __expectString,
|
|
734
|
-
Status: __expectString,
|
|
735
|
-
StatusMessage: __expectString,
|
|
736
|
-
});
|
|
737
|
-
};
|
|
738
|
-
const de_SecretListEntry = (output, context) => {
|
|
739
|
-
return take(output, {
|
|
740
|
-
ARN: __expectString,
|
|
741
|
-
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
742
|
-
DeletedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
743
|
-
Description: __expectString,
|
|
744
|
-
KmsKeyId: __expectString,
|
|
745
|
-
LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
746
|
-
LastChangedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
747
|
-
LastRotatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
748
|
-
Name: __expectString,
|
|
749
|
-
NextRotationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
750
|
-
OwningService: __expectString,
|
|
751
|
-
PrimaryRegion: __expectString,
|
|
752
|
-
RotationEnabled: __expectBoolean,
|
|
753
|
-
RotationLambdaARN: __expectString,
|
|
754
|
-
RotationRules: _json,
|
|
755
|
-
SecretVersionsToStages: _json,
|
|
756
|
-
Tags: _json,
|
|
757
|
-
});
|
|
758
|
-
};
|
|
759
|
-
const de_SecretListType = (output, context) => {
|
|
760
|
-
const retVal = (output || [])
|
|
761
|
-
.filter((e) => e != null)
|
|
762
|
-
.map((entry) => {
|
|
763
|
-
return de_SecretListEntry(entry, context);
|
|
764
|
-
});
|
|
765
|
-
return retVal;
|
|
766
|
-
};
|
|
767
|
-
const de_SecretValueEntry = (output, context) => {
|
|
768
|
-
return take(output, {
|
|
769
|
-
ARN: __expectString,
|
|
770
|
-
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
771
|
-
Name: __expectString,
|
|
772
|
-
SecretBinary: context.base64Decoder,
|
|
773
|
-
SecretString: __expectString,
|
|
774
|
-
VersionId: __expectString,
|
|
775
|
-
VersionStages: _json,
|
|
776
|
-
});
|
|
777
|
-
};
|
|
778
|
-
const de_SecretValuesType = (output, context) => {
|
|
779
|
-
const retVal = (output || [])
|
|
780
|
-
.filter((e) => e != null)
|
|
781
|
-
.map((entry) => {
|
|
782
|
-
return de_SecretValueEntry(entry, context);
|
|
783
|
-
});
|
|
784
|
-
return retVal;
|
|
785
|
-
};
|
|
786
|
-
const de_SecretVersionsListEntry = (output, context) => {
|
|
787
|
-
return take(output, {
|
|
788
|
-
CreatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
789
|
-
KmsKeyIds: _json,
|
|
790
|
-
LastAccessedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
791
|
-
VersionId: __expectString,
|
|
792
|
-
VersionStages: _json,
|
|
793
|
-
});
|
|
794
|
-
};
|
|
795
|
-
const de_SecretVersionsListType = (output, context) => {
|
|
796
|
-
const retVal = (output || [])
|
|
797
|
-
.filter((e) => e != null)
|
|
798
|
-
.map((entry) => {
|
|
799
|
-
return de_SecretVersionsListEntry(entry, context);
|
|
800
|
-
});
|
|
801
|
-
return retVal;
|
|
802
|
-
};
|
|
803
|
-
const deserializeMetadata = (output) => ({
|
|
804
|
-
httpStatusCode: output.statusCode,
|
|
805
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
806
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
807
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
808
|
-
});
|
|
809
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
810
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
811
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
812
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
813
|
-
const contents = {
|
|
814
|
-
protocol,
|
|
815
|
-
hostname,
|
|
816
|
-
port,
|
|
817
|
-
method: "POST",
|
|
818
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
819
|
-
headers,
|
|
820
|
-
};
|
|
821
|
-
if (resolvedHostname !== undefined) {
|
|
822
|
-
contents.hostname = resolvedHostname;
|
|
823
|
-
}
|
|
824
|
-
if (body !== undefined) {
|
|
825
|
-
contents.body = body;
|
|
826
|
-
}
|
|
827
|
-
return new __HttpRequest(contents);
|
|
828
|
-
};
|
|
829
|
-
function sharedHeaders(operation) {
|
|
830
|
-
return {
|
|
831
|
-
"content-type": "application/x-amz-json-1.1",
|
|
832
|
-
"x-amz-target": `secretsmanager.${operation}`,
|
|
833
|
-
};
|
|
834
|
-
}
|