@aws-sdk/client-lambda 3.58.0 → 3.72.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/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/dist-cjs/Lambda.js +75 -0
- package/dist-cjs/commands/CreateFunctionUrlConfigCommand.js +36 -0
- package/dist-cjs/commands/DeleteFunctionUrlConfigCommand.js +36 -0
- package/dist-cjs/commands/GetFunctionUrlConfigCommand.js +36 -0
- package/dist-cjs/commands/ListFunctionUrlConfigsCommand.js +36 -0
- package/dist-cjs/commands/UpdateFunctionUrlConfigCommand.js +36 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +75 -4
- package/dist-cjs/pagination/ListFunctionUrlConfigsPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +585 -3
- package/dist-es/Lambda.js +75 -0
- package/dist-es/commands/CreateFunctionUrlConfigCommand.js +39 -0
- package/dist-es/commands/DeleteFunctionUrlConfigCommand.js +39 -0
- package/dist-es/commands/GetFunctionUrlConfigCommand.js +39 -0
- package/dist-es/commands/ListFunctionUrlConfigsCommand.js +39 -0
- package/dist-es/commands/UpdateFunctionUrlConfigCommand.js +39 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +49 -0
- package/dist-es/pagination/ListFunctionUrlConfigsPaginator.js +74 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +719 -27
- package/dist-types/Lambda.d.ts +37 -0
- package/dist-types/LambdaClient.d.ts +7 -2
- package/dist-types/commands/CreateFunctionUrlConfigCommand.d.ts +36 -0
- package/dist-types/commands/DeleteFunctionUrlConfigCommand.d.ts +36 -0
- package/dist-types/commands/GetFunctionUrlConfigCommand.d.ts +35 -0
- package/dist-types/commands/ListFunctionUrlConfigsCommand.d.ts +35 -0
- package/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +412 -0
- package/dist-types/pagination/ListFunctionUrlConfigsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +15 -0
- package/dist-types/ts3.4/Lambda.d.ts +25 -0
- package/dist-types/ts3.4/LambdaClient.d.ts +7 -2
- package/dist-types/ts3.4/commands/CreateFunctionUrlConfigCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteFunctionUrlConfigCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetFunctionUrlConfigCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListFunctionUrlConfigsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateFunctionUrlConfigCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +166 -0
- package/dist-types/ts3.4/pagination/ListFunctionUrlConfigsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +15 -0
- package/package.json +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_restJson1UpdateFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1UpdateFunctionConfigurationCommand = exports.deserializeAws_restJson1UpdateFunctionCodeCommand = exports.deserializeAws_restJson1UpdateEventSourceMappingCommand = exports.deserializeAws_restJson1UpdateCodeSigningConfigCommand = exports.deserializeAws_restJson1UpdateAliasCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RemovePermissionCommand = exports.deserializeAws_restJson1RemoveLayerVersionPermissionCommand = exports.deserializeAws_restJson1PutProvisionedConcurrencyConfigCommand = exports.deserializeAws_restJson1PutFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1PutFunctionConcurrencyCommand = exports.deserializeAws_restJson1PutFunctionCodeSigningConfigCommand = exports.deserializeAws_restJson1PublishVersionCommand = exports.deserializeAws_restJson1PublishLayerVersionCommand = void 0;
|
|
3
|
+
exports.serializeAws_restJson1PutFunctionConcurrencyCommand = exports.serializeAws_restJson1PutFunctionCodeSigningConfigCommand = exports.serializeAws_restJson1PublishVersionCommand = exports.serializeAws_restJson1PublishLayerVersionCommand = exports.serializeAws_restJson1ListVersionsByFunctionCommand = exports.serializeAws_restJson1ListTagsCommand = exports.serializeAws_restJson1ListProvisionedConcurrencyConfigsCommand = exports.serializeAws_restJson1ListLayerVersionsCommand = exports.serializeAws_restJson1ListLayersCommand = exports.serializeAws_restJson1ListFunctionUrlConfigsCommand = exports.serializeAws_restJson1ListFunctionsByCodeSigningConfigCommand = exports.serializeAws_restJson1ListFunctionsCommand = exports.serializeAws_restJson1ListFunctionEventInvokeConfigsCommand = exports.serializeAws_restJson1ListEventSourceMappingsCommand = exports.serializeAws_restJson1ListCodeSigningConfigsCommand = exports.serializeAws_restJson1ListAliasesCommand = exports.serializeAws_restJson1InvokeAsyncCommand = exports.serializeAws_restJson1InvokeCommand = exports.serializeAws_restJson1GetProvisionedConcurrencyConfigCommand = exports.serializeAws_restJson1GetPolicyCommand = exports.serializeAws_restJson1GetLayerVersionPolicyCommand = exports.serializeAws_restJson1GetLayerVersionByArnCommand = exports.serializeAws_restJson1GetLayerVersionCommand = exports.serializeAws_restJson1GetFunctionUrlConfigCommand = exports.serializeAws_restJson1GetFunctionEventInvokeConfigCommand = exports.serializeAws_restJson1GetFunctionConfigurationCommand = exports.serializeAws_restJson1GetFunctionConcurrencyCommand = exports.serializeAws_restJson1GetFunctionCodeSigningConfigCommand = exports.serializeAws_restJson1GetFunctionCommand = exports.serializeAws_restJson1GetEventSourceMappingCommand = exports.serializeAws_restJson1GetCodeSigningConfigCommand = exports.serializeAws_restJson1GetAliasCommand = exports.serializeAws_restJson1GetAccountSettingsCommand = exports.serializeAws_restJson1DeleteProvisionedConcurrencyConfigCommand = exports.serializeAws_restJson1DeleteLayerVersionCommand = exports.serializeAws_restJson1DeleteFunctionUrlConfigCommand = exports.serializeAws_restJson1DeleteFunctionEventInvokeConfigCommand = exports.serializeAws_restJson1DeleteFunctionConcurrencyCommand = exports.serializeAws_restJson1DeleteFunctionCodeSigningConfigCommand = exports.serializeAws_restJson1DeleteFunctionCommand = exports.serializeAws_restJson1DeleteEventSourceMappingCommand = exports.serializeAws_restJson1DeleteCodeSigningConfigCommand = exports.serializeAws_restJson1DeleteAliasCommand = exports.serializeAws_restJson1CreateFunctionUrlConfigCommand = exports.serializeAws_restJson1CreateFunctionCommand = exports.serializeAws_restJson1CreateEventSourceMappingCommand = exports.serializeAws_restJson1CreateCodeSigningConfigCommand = exports.serializeAws_restJson1CreateAliasCommand = exports.serializeAws_restJson1AddPermissionCommand = exports.serializeAws_restJson1AddLayerVersionPermissionCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1ListEventSourceMappingsCommand = exports.deserializeAws_restJson1ListCodeSigningConfigsCommand = exports.deserializeAws_restJson1ListAliasesCommand = exports.deserializeAws_restJson1InvokeAsyncCommand = exports.deserializeAws_restJson1InvokeCommand = exports.deserializeAws_restJson1GetProvisionedConcurrencyConfigCommand = exports.deserializeAws_restJson1GetPolicyCommand = exports.deserializeAws_restJson1GetLayerVersionPolicyCommand = exports.deserializeAws_restJson1GetLayerVersionByArnCommand = exports.deserializeAws_restJson1GetLayerVersionCommand = exports.deserializeAws_restJson1GetFunctionUrlConfigCommand = exports.deserializeAws_restJson1GetFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1GetFunctionConfigurationCommand = exports.deserializeAws_restJson1GetFunctionConcurrencyCommand = exports.deserializeAws_restJson1GetFunctionCodeSigningConfigCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetEventSourceMappingCommand = exports.deserializeAws_restJson1GetCodeSigningConfigCommand = exports.deserializeAws_restJson1GetAliasCommand = exports.deserializeAws_restJson1GetAccountSettingsCommand = exports.deserializeAws_restJson1DeleteProvisionedConcurrencyConfigCommand = exports.deserializeAws_restJson1DeleteLayerVersionCommand = exports.deserializeAws_restJson1DeleteFunctionUrlConfigCommand = exports.deserializeAws_restJson1DeleteFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1DeleteFunctionConcurrencyCommand = exports.deserializeAws_restJson1DeleteFunctionCodeSigningConfigCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteEventSourceMappingCommand = exports.deserializeAws_restJson1DeleteCodeSigningConfigCommand = exports.deserializeAws_restJson1DeleteAliasCommand = exports.deserializeAws_restJson1CreateFunctionUrlConfigCommand = exports.deserializeAws_restJson1CreateFunctionCommand = exports.deserializeAws_restJson1CreateEventSourceMappingCommand = exports.deserializeAws_restJson1CreateCodeSigningConfigCommand = exports.deserializeAws_restJson1CreateAliasCommand = exports.deserializeAws_restJson1AddPermissionCommand = exports.deserializeAws_restJson1AddLayerVersionPermissionCommand = exports.serializeAws_restJson1UpdateFunctionUrlConfigCommand = exports.serializeAws_restJson1UpdateFunctionEventInvokeConfigCommand = exports.serializeAws_restJson1UpdateFunctionConfigurationCommand = exports.serializeAws_restJson1UpdateFunctionCodeCommand = exports.serializeAws_restJson1UpdateEventSourceMappingCommand = exports.serializeAws_restJson1UpdateCodeSigningConfigCommand = exports.serializeAws_restJson1UpdateAliasCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1RemovePermissionCommand = exports.serializeAws_restJson1RemoveLayerVersionPermissionCommand = exports.serializeAws_restJson1PutProvisionedConcurrencyConfigCommand = exports.serializeAws_restJson1PutFunctionEventInvokeConfigCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateFunctionUrlConfigCommand = exports.deserializeAws_restJson1UpdateFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1UpdateFunctionConfigurationCommand = exports.deserializeAws_restJson1UpdateFunctionCodeCommand = exports.deserializeAws_restJson1UpdateEventSourceMappingCommand = exports.deserializeAws_restJson1UpdateCodeSigningConfigCommand = exports.deserializeAws_restJson1UpdateAliasCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RemovePermissionCommand = exports.deserializeAws_restJson1RemoveLayerVersionPermissionCommand = exports.deserializeAws_restJson1PutProvisionedConcurrencyConfigCommand = exports.deserializeAws_restJson1PutFunctionEventInvokeConfigCommand = exports.deserializeAws_restJson1PutFunctionConcurrencyCommand = exports.deserializeAws_restJson1PutFunctionCodeSigningConfigCommand = exports.deserializeAws_restJson1PublishVersionCommand = exports.deserializeAws_restJson1PublishLayerVersionCommand = exports.deserializeAws_restJson1ListVersionsByFunctionCommand = exports.deserializeAws_restJson1ListTagsCommand = exports.deserializeAws_restJson1ListProvisionedConcurrencyConfigsCommand = exports.deserializeAws_restJson1ListLayerVersionsCommand = exports.deserializeAws_restJson1ListLayersCommand = exports.deserializeAws_restJson1ListFunctionUrlConfigsCommand = exports.deserializeAws_restJson1ListFunctionsByCodeSigningConfigCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListFunctionEventInvokeConfigsCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const LambdaServiceException_1 = require("../models/LambdaServiceException");
|
|
@@ -82,6 +82,8 @@ const serializeAws_restJson1AddPermissionCommand = async (input, context) => {
|
|
|
82
82
|
...(input.Action !== undefined && input.Action !== null && { Action: input.Action }),
|
|
83
83
|
...(input.EventSourceToken !== undefined &&
|
|
84
84
|
input.EventSourceToken !== null && { EventSourceToken: input.EventSourceToken }),
|
|
85
|
+
...(input.FunctionUrlAuthType !== undefined &&
|
|
86
|
+
input.FunctionUrlAuthType !== null && { FunctionUrlAuthType: input.FunctionUrlAuthType }),
|
|
85
87
|
...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
|
|
86
88
|
...(input.PrincipalOrgID !== undefined &&
|
|
87
89
|
input.PrincipalOrgID !== null && { PrincipalOrgID: input.PrincipalOrgID }),
|
|
@@ -302,6 +304,42 @@ const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
|
|
|
302
304
|
});
|
|
303
305
|
};
|
|
304
306
|
exports.serializeAws_restJson1CreateFunctionCommand = serializeAws_restJson1CreateFunctionCommand;
|
|
307
|
+
const serializeAws_restJson1CreateFunctionUrlConfigCommand = async (input, context) => {
|
|
308
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
309
|
+
const headers = {
|
|
310
|
+
"content-type": "application/json",
|
|
311
|
+
};
|
|
312
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-10-31/functions/{FunctionName}/url";
|
|
313
|
+
if (input.FunctionName !== undefined) {
|
|
314
|
+
const labelValue = input.FunctionName;
|
|
315
|
+
if (labelValue.length <= 0) {
|
|
316
|
+
throw new Error("Empty value provided for input HTTP label: FunctionName.");
|
|
317
|
+
}
|
|
318
|
+
resolvedPath = resolvedPath.replace("{FunctionName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
throw new Error("No value provided for input HTTP label: FunctionName.");
|
|
322
|
+
}
|
|
323
|
+
const query = {
|
|
324
|
+
...(input.Qualifier !== undefined && { Qualifier: input.Qualifier }),
|
|
325
|
+
};
|
|
326
|
+
let body;
|
|
327
|
+
body = JSON.stringify({
|
|
328
|
+
...(input.AuthType !== undefined && input.AuthType !== null && { AuthType: input.AuthType }),
|
|
329
|
+
...(input.Cors !== undefined && input.Cors !== null && { Cors: serializeAws_restJson1Cors(input.Cors, context) }),
|
|
330
|
+
});
|
|
331
|
+
return new protocol_http_1.HttpRequest({
|
|
332
|
+
protocol,
|
|
333
|
+
hostname,
|
|
334
|
+
port,
|
|
335
|
+
method: "POST",
|
|
336
|
+
headers,
|
|
337
|
+
path: resolvedPath,
|
|
338
|
+
query,
|
|
339
|
+
body,
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
exports.serializeAws_restJson1CreateFunctionUrlConfigCommand = serializeAws_restJson1CreateFunctionUrlConfigCommand;
|
|
305
343
|
const serializeAws_restJson1DeleteAliasCommand = async (input, context) => {
|
|
306
344
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
307
345
|
const headers = {};
|
|
@@ -507,6 +545,36 @@ const serializeAws_restJson1DeleteFunctionEventInvokeConfigCommand = async (inpu
|
|
|
507
545
|
});
|
|
508
546
|
};
|
|
509
547
|
exports.serializeAws_restJson1DeleteFunctionEventInvokeConfigCommand = serializeAws_restJson1DeleteFunctionEventInvokeConfigCommand;
|
|
548
|
+
const serializeAws_restJson1DeleteFunctionUrlConfigCommand = async (input, context) => {
|
|
549
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
550
|
+
const headers = {};
|
|
551
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-10-31/functions/{FunctionName}/url";
|
|
552
|
+
if (input.FunctionName !== undefined) {
|
|
553
|
+
const labelValue = input.FunctionName;
|
|
554
|
+
if (labelValue.length <= 0) {
|
|
555
|
+
throw new Error("Empty value provided for input HTTP label: FunctionName.");
|
|
556
|
+
}
|
|
557
|
+
resolvedPath = resolvedPath.replace("{FunctionName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
throw new Error("No value provided for input HTTP label: FunctionName.");
|
|
561
|
+
}
|
|
562
|
+
const query = {
|
|
563
|
+
...(input.Qualifier !== undefined && { Qualifier: input.Qualifier }),
|
|
564
|
+
};
|
|
565
|
+
let body;
|
|
566
|
+
return new protocol_http_1.HttpRequest({
|
|
567
|
+
protocol,
|
|
568
|
+
hostname,
|
|
569
|
+
port,
|
|
570
|
+
method: "DELETE",
|
|
571
|
+
headers,
|
|
572
|
+
path: resolvedPath,
|
|
573
|
+
query,
|
|
574
|
+
body,
|
|
575
|
+
});
|
|
576
|
+
};
|
|
577
|
+
exports.serializeAws_restJson1DeleteFunctionUrlConfigCommand = serializeAws_restJson1DeleteFunctionUrlConfigCommand;
|
|
510
578
|
const serializeAws_restJson1DeleteLayerVersionCommand = async (input, context) => {
|
|
511
579
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
512
580
|
const headers = {};
|
|
@@ -830,6 +898,36 @@ const serializeAws_restJson1GetFunctionEventInvokeConfigCommand = async (input,
|
|
|
830
898
|
});
|
|
831
899
|
};
|
|
832
900
|
exports.serializeAws_restJson1GetFunctionEventInvokeConfigCommand = serializeAws_restJson1GetFunctionEventInvokeConfigCommand;
|
|
901
|
+
const serializeAws_restJson1GetFunctionUrlConfigCommand = async (input, context) => {
|
|
902
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
903
|
+
const headers = {};
|
|
904
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-10-31/functions/{FunctionName}/url";
|
|
905
|
+
if (input.FunctionName !== undefined) {
|
|
906
|
+
const labelValue = input.FunctionName;
|
|
907
|
+
if (labelValue.length <= 0) {
|
|
908
|
+
throw new Error("Empty value provided for input HTTP label: FunctionName.");
|
|
909
|
+
}
|
|
910
|
+
resolvedPath = resolvedPath.replace("{FunctionName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
throw new Error("No value provided for input HTTP label: FunctionName.");
|
|
914
|
+
}
|
|
915
|
+
const query = {
|
|
916
|
+
...(input.Qualifier !== undefined && { Qualifier: input.Qualifier }),
|
|
917
|
+
};
|
|
918
|
+
let body;
|
|
919
|
+
return new protocol_http_1.HttpRequest({
|
|
920
|
+
protocol,
|
|
921
|
+
hostname,
|
|
922
|
+
port,
|
|
923
|
+
method: "GET",
|
|
924
|
+
headers,
|
|
925
|
+
path: resolvedPath,
|
|
926
|
+
query,
|
|
927
|
+
body,
|
|
928
|
+
});
|
|
929
|
+
};
|
|
930
|
+
exports.serializeAws_restJson1GetFunctionUrlConfigCommand = serializeAws_restJson1GetFunctionUrlConfigCommand;
|
|
833
931
|
const serializeAws_restJson1GetLayerVersionCommand = async (input, context) => {
|
|
834
932
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
835
933
|
const headers = {};
|
|
@@ -1222,6 +1320,37 @@ const serializeAws_restJson1ListFunctionsByCodeSigningConfigCommand = async (inp
|
|
|
1222
1320
|
});
|
|
1223
1321
|
};
|
|
1224
1322
|
exports.serializeAws_restJson1ListFunctionsByCodeSigningConfigCommand = serializeAws_restJson1ListFunctionsByCodeSigningConfigCommand;
|
|
1323
|
+
const serializeAws_restJson1ListFunctionUrlConfigsCommand = async (input, context) => {
|
|
1324
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1325
|
+
const headers = {};
|
|
1326
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-10-31/functions/{FunctionName}/urls";
|
|
1327
|
+
if (input.FunctionName !== undefined) {
|
|
1328
|
+
const labelValue = input.FunctionName;
|
|
1329
|
+
if (labelValue.length <= 0) {
|
|
1330
|
+
throw new Error("Empty value provided for input HTTP label: FunctionName.");
|
|
1331
|
+
}
|
|
1332
|
+
resolvedPath = resolvedPath.replace("{FunctionName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1333
|
+
}
|
|
1334
|
+
else {
|
|
1335
|
+
throw new Error("No value provided for input HTTP label: FunctionName.");
|
|
1336
|
+
}
|
|
1337
|
+
const query = {
|
|
1338
|
+
...(input.Marker !== undefined && { Marker: input.Marker }),
|
|
1339
|
+
...(input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() }),
|
|
1340
|
+
};
|
|
1341
|
+
let body;
|
|
1342
|
+
return new protocol_http_1.HttpRequest({
|
|
1343
|
+
protocol,
|
|
1344
|
+
hostname,
|
|
1345
|
+
port,
|
|
1346
|
+
method: "GET",
|
|
1347
|
+
headers,
|
|
1348
|
+
path: resolvedPath,
|
|
1349
|
+
query,
|
|
1350
|
+
body,
|
|
1351
|
+
});
|
|
1352
|
+
};
|
|
1353
|
+
exports.serializeAws_restJson1ListFunctionUrlConfigsCommand = serializeAws_restJson1ListFunctionUrlConfigsCommand;
|
|
1225
1354
|
const serializeAws_restJson1ListLayersCommand = async (input, context) => {
|
|
1226
1355
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1227
1356
|
const headers = {};
|
|
@@ -2050,6 +2179,42 @@ const serializeAws_restJson1UpdateFunctionEventInvokeConfigCommand = async (inpu
|
|
|
2050
2179
|
});
|
|
2051
2180
|
};
|
|
2052
2181
|
exports.serializeAws_restJson1UpdateFunctionEventInvokeConfigCommand = serializeAws_restJson1UpdateFunctionEventInvokeConfigCommand;
|
|
2182
|
+
const serializeAws_restJson1UpdateFunctionUrlConfigCommand = async (input, context) => {
|
|
2183
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2184
|
+
const headers = {
|
|
2185
|
+
"content-type": "application/json",
|
|
2186
|
+
};
|
|
2187
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2021-10-31/functions/{FunctionName}/url";
|
|
2188
|
+
if (input.FunctionName !== undefined) {
|
|
2189
|
+
const labelValue = input.FunctionName;
|
|
2190
|
+
if (labelValue.length <= 0) {
|
|
2191
|
+
throw new Error("Empty value provided for input HTTP label: FunctionName.");
|
|
2192
|
+
}
|
|
2193
|
+
resolvedPath = resolvedPath.replace("{FunctionName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
2194
|
+
}
|
|
2195
|
+
else {
|
|
2196
|
+
throw new Error("No value provided for input HTTP label: FunctionName.");
|
|
2197
|
+
}
|
|
2198
|
+
const query = {
|
|
2199
|
+
...(input.Qualifier !== undefined && { Qualifier: input.Qualifier }),
|
|
2200
|
+
};
|
|
2201
|
+
let body;
|
|
2202
|
+
body = JSON.stringify({
|
|
2203
|
+
...(input.AuthType !== undefined && input.AuthType !== null && { AuthType: input.AuthType }),
|
|
2204
|
+
...(input.Cors !== undefined && input.Cors !== null && { Cors: serializeAws_restJson1Cors(input.Cors, context) }),
|
|
2205
|
+
});
|
|
2206
|
+
return new protocol_http_1.HttpRequest({
|
|
2207
|
+
protocol,
|
|
2208
|
+
hostname,
|
|
2209
|
+
port,
|
|
2210
|
+
method: "PUT",
|
|
2211
|
+
headers,
|
|
2212
|
+
path: resolvedPath,
|
|
2213
|
+
query,
|
|
2214
|
+
body,
|
|
2215
|
+
});
|
|
2216
|
+
};
|
|
2217
|
+
exports.serializeAws_restJson1UpdateFunctionUrlConfigCommand = serializeAws_restJson1UpdateFunctionUrlConfigCommand;
|
|
2053
2218
|
const deserializeAws_restJson1AddLayerVersionPermissionCommand = async (output, context) => {
|
|
2054
2219
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
2055
2220
|
return deserializeAws_restJson1AddLayerVersionPermissionCommandError(output, context);
|
|
@@ -2599,6 +2764,71 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
|
|
|
2599
2764
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2600
2765
|
}
|
|
2601
2766
|
};
|
|
2767
|
+
const deserializeAws_restJson1CreateFunctionUrlConfigCommand = async (output, context) => {
|
|
2768
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
2769
|
+
return deserializeAws_restJson1CreateFunctionUrlConfigCommandError(output, context);
|
|
2770
|
+
}
|
|
2771
|
+
const contents = {
|
|
2772
|
+
$metadata: deserializeMetadata(output),
|
|
2773
|
+
AuthType: undefined,
|
|
2774
|
+
Cors: undefined,
|
|
2775
|
+
CreationTime: undefined,
|
|
2776
|
+
FunctionArn: undefined,
|
|
2777
|
+
FunctionUrl: undefined,
|
|
2778
|
+
};
|
|
2779
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2780
|
+
if (data.AuthType !== undefined && data.AuthType !== null) {
|
|
2781
|
+
contents.AuthType = (0, smithy_client_1.expectString)(data.AuthType);
|
|
2782
|
+
}
|
|
2783
|
+
if (data.Cors !== undefined && data.Cors !== null) {
|
|
2784
|
+
contents.Cors = deserializeAws_restJson1Cors(data.Cors, context);
|
|
2785
|
+
}
|
|
2786
|
+
if (data.CreationTime !== undefined && data.CreationTime !== null) {
|
|
2787
|
+
contents.CreationTime = (0, smithy_client_1.expectString)(data.CreationTime);
|
|
2788
|
+
}
|
|
2789
|
+
if (data.FunctionArn !== undefined && data.FunctionArn !== null) {
|
|
2790
|
+
contents.FunctionArn = (0, smithy_client_1.expectString)(data.FunctionArn);
|
|
2791
|
+
}
|
|
2792
|
+
if (data.FunctionUrl !== undefined && data.FunctionUrl !== null) {
|
|
2793
|
+
contents.FunctionUrl = (0, smithy_client_1.expectString)(data.FunctionUrl);
|
|
2794
|
+
}
|
|
2795
|
+
return Promise.resolve(contents);
|
|
2796
|
+
};
|
|
2797
|
+
exports.deserializeAws_restJson1CreateFunctionUrlConfigCommand = deserializeAws_restJson1CreateFunctionUrlConfigCommand;
|
|
2798
|
+
const deserializeAws_restJson1CreateFunctionUrlConfigCommandError = async (output, context) => {
|
|
2799
|
+
const parsedOutput = {
|
|
2800
|
+
...output,
|
|
2801
|
+
body: await parseBody(output.body, context),
|
|
2802
|
+
};
|
|
2803
|
+
let response;
|
|
2804
|
+
let errorCode = "UnknownError";
|
|
2805
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2806
|
+
switch (errorCode) {
|
|
2807
|
+
case "InvalidParameterValueException":
|
|
2808
|
+
case "com.amazonaws.lambda#InvalidParameterValueException":
|
|
2809
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
2810
|
+
case "ResourceConflictException":
|
|
2811
|
+
case "com.amazonaws.lambda#ResourceConflictException":
|
|
2812
|
+
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
2813
|
+
case "ResourceNotFoundException":
|
|
2814
|
+
case "com.amazonaws.lambda#ResourceNotFoundException":
|
|
2815
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2816
|
+
case "ServiceException":
|
|
2817
|
+
case "com.amazonaws.lambda#ServiceException":
|
|
2818
|
+
throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
|
|
2819
|
+
case "TooManyRequestsException":
|
|
2820
|
+
case "com.amazonaws.lambda#TooManyRequestsException":
|
|
2821
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
2822
|
+
default:
|
|
2823
|
+
const parsedBody = parsedOutput.body;
|
|
2824
|
+
response = new LambdaServiceException_1.LambdaServiceException({
|
|
2825
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2826
|
+
$fault: "client",
|
|
2827
|
+
$metadata: deserializeMetadata(output),
|
|
2828
|
+
});
|
|
2829
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2830
|
+
}
|
|
2831
|
+
};
|
|
2602
2832
|
const deserializeAws_restJson1DeleteAliasCommand = async (output, context) => {
|
|
2603
2833
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2604
2834
|
return deserializeAws_restJson1DeleteAliasCommandError(output, context);
|
|
@@ -3003,6 +3233,48 @@ const deserializeAws_restJson1DeleteFunctionEventInvokeConfigCommandError = asyn
|
|
|
3003
3233
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3004
3234
|
}
|
|
3005
3235
|
};
|
|
3236
|
+
const deserializeAws_restJson1DeleteFunctionUrlConfigCommand = async (output, context) => {
|
|
3237
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3238
|
+
return deserializeAws_restJson1DeleteFunctionUrlConfigCommandError(output, context);
|
|
3239
|
+
}
|
|
3240
|
+
const contents = {
|
|
3241
|
+
$metadata: deserializeMetadata(output),
|
|
3242
|
+
};
|
|
3243
|
+
await collectBody(output.body, context);
|
|
3244
|
+
return Promise.resolve(contents);
|
|
3245
|
+
};
|
|
3246
|
+
exports.deserializeAws_restJson1DeleteFunctionUrlConfigCommand = deserializeAws_restJson1DeleteFunctionUrlConfigCommand;
|
|
3247
|
+
const deserializeAws_restJson1DeleteFunctionUrlConfigCommandError = async (output, context) => {
|
|
3248
|
+
const parsedOutput = {
|
|
3249
|
+
...output,
|
|
3250
|
+
body: await parseBody(output.body, context),
|
|
3251
|
+
};
|
|
3252
|
+
let response;
|
|
3253
|
+
let errorCode = "UnknownError";
|
|
3254
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3255
|
+
switch (errorCode) {
|
|
3256
|
+
case "ResourceConflictException":
|
|
3257
|
+
case "com.amazonaws.lambda#ResourceConflictException":
|
|
3258
|
+
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
3259
|
+
case "ResourceNotFoundException":
|
|
3260
|
+
case "com.amazonaws.lambda#ResourceNotFoundException":
|
|
3261
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
3262
|
+
case "ServiceException":
|
|
3263
|
+
case "com.amazonaws.lambda#ServiceException":
|
|
3264
|
+
throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
|
|
3265
|
+
case "TooManyRequestsException":
|
|
3266
|
+
case "com.amazonaws.lambda#TooManyRequestsException":
|
|
3267
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
3268
|
+
default:
|
|
3269
|
+
const parsedBody = parsedOutput.body;
|
|
3270
|
+
response = new LambdaServiceException_1.LambdaServiceException({
|
|
3271
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3272
|
+
$fault: "client",
|
|
3273
|
+
$metadata: deserializeMetadata(output),
|
|
3274
|
+
});
|
|
3275
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3276
|
+
}
|
|
3277
|
+
};
|
|
3006
3278
|
const deserializeAws_restJson1DeleteLayerVersionCommand = async (output, context) => {
|
|
3007
3279
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3008
3280
|
return deserializeAws_restJson1DeleteLayerVersionCommandError(output, context);
|
|
@@ -3761,6 +4033,72 @@ const deserializeAws_restJson1GetFunctionEventInvokeConfigCommandError = async (
|
|
|
3761
4033
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3762
4034
|
}
|
|
3763
4035
|
};
|
|
4036
|
+
const deserializeAws_restJson1GetFunctionUrlConfigCommand = async (output, context) => {
|
|
4037
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4038
|
+
return deserializeAws_restJson1GetFunctionUrlConfigCommandError(output, context);
|
|
4039
|
+
}
|
|
4040
|
+
const contents = {
|
|
4041
|
+
$metadata: deserializeMetadata(output),
|
|
4042
|
+
AuthType: undefined,
|
|
4043
|
+
Cors: undefined,
|
|
4044
|
+
CreationTime: undefined,
|
|
4045
|
+
FunctionArn: undefined,
|
|
4046
|
+
FunctionUrl: undefined,
|
|
4047
|
+
LastModifiedTime: undefined,
|
|
4048
|
+
};
|
|
4049
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4050
|
+
if (data.AuthType !== undefined && data.AuthType !== null) {
|
|
4051
|
+
contents.AuthType = (0, smithy_client_1.expectString)(data.AuthType);
|
|
4052
|
+
}
|
|
4053
|
+
if (data.Cors !== undefined && data.Cors !== null) {
|
|
4054
|
+
contents.Cors = deserializeAws_restJson1Cors(data.Cors, context);
|
|
4055
|
+
}
|
|
4056
|
+
if (data.CreationTime !== undefined && data.CreationTime !== null) {
|
|
4057
|
+
contents.CreationTime = (0, smithy_client_1.expectString)(data.CreationTime);
|
|
4058
|
+
}
|
|
4059
|
+
if (data.FunctionArn !== undefined && data.FunctionArn !== null) {
|
|
4060
|
+
contents.FunctionArn = (0, smithy_client_1.expectString)(data.FunctionArn);
|
|
4061
|
+
}
|
|
4062
|
+
if (data.FunctionUrl !== undefined && data.FunctionUrl !== null) {
|
|
4063
|
+
contents.FunctionUrl = (0, smithy_client_1.expectString)(data.FunctionUrl);
|
|
4064
|
+
}
|
|
4065
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
4066
|
+
contents.LastModifiedTime = (0, smithy_client_1.expectString)(data.LastModifiedTime);
|
|
4067
|
+
}
|
|
4068
|
+
return Promise.resolve(contents);
|
|
4069
|
+
};
|
|
4070
|
+
exports.deserializeAws_restJson1GetFunctionUrlConfigCommand = deserializeAws_restJson1GetFunctionUrlConfigCommand;
|
|
4071
|
+
const deserializeAws_restJson1GetFunctionUrlConfigCommandError = async (output, context) => {
|
|
4072
|
+
const parsedOutput = {
|
|
4073
|
+
...output,
|
|
4074
|
+
body: await parseBody(output.body, context),
|
|
4075
|
+
};
|
|
4076
|
+
let response;
|
|
4077
|
+
let errorCode = "UnknownError";
|
|
4078
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4079
|
+
switch (errorCode) {
|
|
4080
|
+
case "InvalidParameterValueException":
|
|
4081
|
+
case "com.amazonaws.lambda#InvalidParameterValueException":
|
|
4082
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4083
|
+
case "ResourceNotFoundException":
|
|
4084
|
+
case "com.amazonaws.lambda#ResourceNotFoundException":
|
|
4085
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
4086
|
+
case "ServiceException":
|
|
4087
|
+
case "com.amazonaws.lambda#ServiceException":
|
|
4088
|
+
throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
|
|
4089
|
+
case "TooManyRequestsException":
|
|
4090
|
+
case "com.amazonaws.lambda#TooManyRequestsException":
|
|
4091
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4092
|
+
default:
|
|
4093
|
+
const parsedBody = parsedOutput.body;
|
|
4094
|
+
response = new LambdaServiceException_1.LambdaServiceException({
|
|
4095
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4096
|
+
$fault: "client",
|
|
4097
|
+
$metadata: deserializeMetadata(output),
|
|
4098
|
+
});
|
|
4099
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4100
|
+
}
|
|
4101
|
+
};
|
|
3764
4102
|
const deserializeAws_restJson1GetLayerVersionCommand = async (output, context) => {
|
|
3765
4103
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3766
4104
|
return deserializeAws_restJson1GetLayerVersionCommandError(output, context);
|
|
@@ -4552,6 +4890,56 @@ const deserializeAws_restJson1ListFunctionsByCodeSigningConfigCommandError = asy
|
|
|
4552
4890
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4553
4891
|
}
|
|
4554
4892
|
};
|
|
4893
|
+
const deserializeAws_restJson1ListFunctionUrlConfigsCommand = async (output, context) => {
|
|
4894
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4895
|
+
return deserializeAws_restJson1ListFunctionUrlConfigsCommandError(output, context);
|
|
4896
|
+
}
|
|
4897
|
+
const contents = {
|
|
4898
|
+
$metadata: deserializeMetadata(output),
|
|
4899
|
+
FunctionUrlConfigs: undefined,
|
|
4900
|
+
NextMarker: undefined,
|
|
4901
|
+
};
|
|
4902
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4903
|
+
if (data.FunctionUrlConfigs !== undefined && data.FunctionUrlConfigs !== null) {
|
|
4904
|
+
contents.FunctionUrlConfigs = deserializeAws_restJson1FunctionUrlConfigList(data.FunctionUrlConfigs, context);
|
|
4905
|
+
}
|
|
4906
|
+
if (data.NextMarker !== undefined && data.NextMarker !== null) {
|
|
4907
|
+
contents.NextMarker = (0, smithy_client_1.expectString)(data.NextMarker);
|
|
4908
|
+
}
|
|
4909
|
+
return Promise.resolve(contents);
|
|
4910
|
+
};
|
|
4911
|
+
exports.deserializeAws_restJson1ListFunctionUrlConfigsCommand = deserializeAws_restJson1ListFunctionUrlConfigsCommand;
|
|
4912
|
+
const deserializeAws_restJson1ListFunctionUrlConfigsCommandError = async (output, context) => {
|
|
4913
|
+
const parsedOutput = {
|
|
4914
|
+
...output,
|
|
4915
|
+
body: await parseBody(output.body, context),
|
|
4916
|
+
};
|
|
4917
|
+
let response;
|
|
4918
|
+
let errorCode = "UnknownError";
|
|
4919
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4920
|
+
switch (errorCode) {
|
|
4921
|
+
case "InvalidParameterValueException":
|
|
4922
|
+
case "com.amazonaws.lambda#InvalidParameterValueException":
|
|
4923
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
4924
|
+
case "ResourceNotFoundException":
|
|
4925
|
+
case "com.amazonaws.lambda#ResourceNotFoundException":
|
|
4926
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
4927
|
+
case "ServiceException":
|
|
4928
|
+
case "com.amazonaws.lambda#ServiceException":
|
|
4929
|
+
throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
|
|
4930
|
+
case "TooManyRequestsException":
|
|
4931
|
+
case "com.amazonaws.lambda#TooManyRequestsException":
|
|
4932
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
4933
|
+
default:
|
|
4934
|
+
const parsedBody = parsedOutput.body;
|
|
4935
|
+
response = new LambdaServiceException_1.LambdaServiceException({
|
|
4936
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4937
|
+
$fault: "client",
|
|
4938
|
+
$metadata: deserializeMetadata(output),
|
|
4939
|
+
});
|
|
4940
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4941
|
+
}
|
|
4942
|
+
};
|
|
4555
4943
|
const deserializeAws_restJson1ListLayersCommand = async (output, context) => {
|
|
4556
4944
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4557
4945
|
return deserializeAws_restJson1ListLayersCommandError(output, context);
|
|
@@ -6182,6 +6570,75 @@ const deserializeAws_restJson1UpdateFunctionEventInvokeConfigCommandError = asyn
|
|
|
6182
6570
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
6183
6571
|
}
|
|
6184
6572
|
};
|
|
6573
|
+
const deserializeAws_restJson1UpdateFunctionUrlConfigCommand = async (output, context) => {
|
|
6574
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6575
|
+
return deserializeAws_restJson1UpdateFunctionUrlConfigCommandError(output, context);
|
|
6576
|
+
}
|
|
6577
|
+
const contents = {
|
|
6578
|
+
$metadata: deserializeMetadata(output),
|
|
6579
|
+
AuthType: undefined,
|
|
6580
|
+
Cors: undefined,
|
|
6581
|
+
CreationTime: undefined,
|
|
6582
|
+
FunctionArn: undefined,
|
|
6583
|
+
FunctionUrl: undefined,
|
|
6584
|
+
LastModifiedTime: undefined,
|
|
6585
|
+
};
|
|
6586
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
6587
|
+
if (data.AuthType !== undefined && data.AuthType !== null) {
|
|
6588
|
+
contents.AuthType = (0, smithy_client_1.expectString)(data.AuthType);
|
|
6589
|
+
}
|
|
6590
|
+
if (data.Cors !== undefined && data.Cors !== null) {
|
|
6591
|
+
contents.Cors = deserializeAws_restJson1Cors(data.Cors, context);
|
|
6592
|
+
}
|
|
6593
|
+
if (data.CreationTime !== undefined && data.CreationTime !== null) {
|
|
6594
|
+
contents.CreationTime = (0, smithy_client_1.expectString)(data.CreationTime);
|
|
6595
|
+
}
|
|
6596
|
+
if (data.FunctionArn !== undefined && data.FunctionArn !== null) {
|
|
6597
|
+
contents.FunctionArn = (0, smithy_client_1.expectString)(data.FunctionArn);
|
|
6598
|
+
}
|
|
6599
|
+
if (data.FunctionUrl !== undefined && data.FunctionUrl !== null) {
|
|
6600
|
+
contents.FunctionUrl = (0, smithy_client_1.expectString)(data.FunctionUrl);
|
|
6601
|
+
}
|
|
6602
|
+
if (data.LastModifiedTime !== undefined && data.LastModifiedTime !== null) {
|
|
6603
|
+
contents.LastModifiedTime = (0, smithy_client_1.expectString)(data.LastModifiedTime);
|
|
6604
|
+
}
|
|
6605
|
+
return Promise.resolve(contents);
|
|
6606
|
+
};
|
|
6607
|
+
exports.deserializeAws_restJson1UpdateFunctionUrlConfigCommand = deserializeAws_restJson1UpdateFunctionUrlConfigCommand;
|
|
6608
|
+
const deserializeAws_restJson1UpdateFunctionUrlConfigCommandError = async (output, context) => {
|
|
6609
|
+
const parsedOutput = {
|
|
6610
|
+
...output,
|
|
6611
|
+
body: await parseBody(output.body, context),
|
|
6612
|
+
};
|
|
6613
|
+
let response;
|
|
6614
|
+
let errorCode = "UnknownError";
|
|
6615
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6616
|
+
switch (errorCode) {
|
|
6617
|
+
case "InvalidParameterValueException":
|
|
6618
|
+
case "com.amazonaws.lambda#InvalidParameterValueException":
|
|
6619
|
+
throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
6620
|
+
case "ResourceConflictException":
|
|
6621
|
+
case "com.amazonaws.lambda#ResourceConflictException":
|
|
6622
|
+
throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
|
|
6623
|
+
case "ResourceNotFoundException":
|
|
6624
|
+
case "com.amazonaws.lambda#ResourceNotFoundException":
|
|
6625
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
6626
|
+
case "ServiceException":
|
|
6627
|
+
case "com.amazonaws.lambda#ServiceException":
|
|
6628
|
+
throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
|
|
6629
|
+
case "TooManyRequestsException":
|
|
6630
|
+
case "com.amazonaws.lambda#TooManyRequestsException":
|
|
6631
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
6632
|
+
default:
|
|
6633
|
+
const parsedBody = parsedOutput.body;
|
|
6634
|
+
response = new LambdaServiceException_1.LambdaServiceException({
|
|
6635
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
6636
|
+
$fault: "client",
|
|
6637
|
+
$metadata: deserializeMetadata(output),
|
|
6638
|
+
});
|
|
6639
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
6640
|
+
}
|
|
6641
|
+
};
|
|
6185
6642
|
const deserializeAws_restJson1CodeSigningConfigNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
6186
6643
|
const contents = {};
|
|
6187
6644
|
const data = parsedOutput.body;
|
|
@@ -6728,6 +7185,26 @@ const serializeAws_restJson1AllowedPublishers = (input, context) => {
|
|
|
6728
7185
|
}),
|
|
6729
7186
|
};
|
|
6730
7187
|
};
|
|
7188
|
+
const serializeAws_restJson1AllowMethodsList = (input, context) => {
|
|
7189
|
+
return input
|
|
7190
|
+
.filter((e) => e != null)
|
|
7191
|
+
.map((entry) => {
|
|
7192
|
+
if (entry === null) {
|
|
7193
|
+
return null;
|
|
7194
|
+
}
|
|
7195
|
+
return entry;
|
|
7196
|
+
});
|
|
7197
|
+
};
|
|
7198
|
+
const serializeAws_restJson1AllowOriginsList = (input, context) => {
|
|
7199
|
+
return input
|
|
7200
|
+
.filter((e) => e != null)
|
|
7201
|
+
.map((entry) => {
|
|
7202
|
+
if (entry === null) {
|
|
7203
|
+
return null;
|
|
7204
|
+
}
|
|
7205
|
+
return entry;
|
|
7206
|
+
});
|
|
7207
|
+
};
|
|
6731
7208
|
const serializeAws_restJson1ArchitecturesList = (input, context) => {
|
|
6732
7209
|
return input
|
|
6733
7210
|
.filter((e) => e != null)
|
|
@@ -6766,6 +7243,27 @@ const serializeAws_restJson1CompatibleRuntimes = (input, context) => {
|
|
|
6766
7243
|
return entry;
|
|
6767
7244
|
});
|
|
6768
7245
|
};
|
|
7246
|
+
const serializeAws_restJson1Cors = (input, context) => {
|
|
7247
|
+
return {
|
|
7248
|
+
...(input.AllowCredentials !== undefined &&
|
|
7249
|
+
input.AllowCredentials !== null && { AllowCredentials: input.AllowCredentials }),
|
|
7250
|
+
...(input.AllowHeaders !== undefined &&
|
|
7251
|
+
input.AllowHeaders !== null && { AllowHeaders: serializeAws_restJson1HeadersList(input.AllowHeaders, context) }),
|
|
7252
|
+
...(input.AllowMethods !== undefined &&
|
|
7253
|
+
input.AllowMethods !== null && {
|
|
7254
|
+
AllowMethods: serializeAws_restJson1AllowMethodsList(input.AllowMethods, context),
|
|
7255
|
+
}),
|
|
7256
|
+
...(input.AllowOrigins !== undefined &&
|
|
7257
|
+
input.AllowOrigins !== null && {
|
|
7258
|
+
AllowOrigins: serializeAws_restJson1AllowOriginsList(input.AllowOrigins, context),
|
|
7259
|
+
}),
|
|
7260
|
+
...(input.ExposeHeaders !== undefined &&
|
|
7261
|
+
input.ExposeHeaders !== null && {
|
|
7262
|
+
ExposeHeaders: serializeAws_restJson1HeadersList(input.ExposeHeaders, context),
|
|
7263
|
+
}),
|
|
7264
|
+
...(input.MaxAge !== undefined && input.MaxAge !== null && { MaxAge: input.MaxAge }),
|
|
7265
|
+
};
|
|
7266
|
+
};
|
|
6769
7267
|
const serializeAws_restJson1DeadLetterConfig = (input, context) => {
|
|
6770
7268
|
return {
|
|
6771
7269
|
...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }),
|
|
@@ -6880,6 +7378,16 @@ const serializeAws_restJson1FunctionResponseTypeList = (input, context) => {
|
|
|
6880
7378
|
return entry;
|
|
6881
7379
|
});
|
|
6882
7380
|
};
|
|
7381
|
+
const serializeAws_restJson1HeadersList = (input, context) => {
|
|
7382
|
+
return input
|
|
7383
|
+
.filter((e) => e != null)
|
|
7384
|
+
.map((entry) => {
|
|
7385
|
+
if (entry === null) {
|
|
7386
|
+
return null;
|
|
7387
|
+
}
|
|
7388
|
+
return entry;
|
|
7389
|
+
});
|
|
7390
|
+
};
|
|
6883
7391
|
const serializeAws_restJson1ImageConfig = (input, context) => {
|
|
6884
7392
|
return {
|
|
6885
7393
|
...(input.Command !== undefined &&
|
|
@@ -7090,6 +7598,28 @@ const deserializeAws_restJson1AllowedPublishers = (output, context) => {
|
|
|
7090
7598
|
: undefined,
|
|
7091
7599
|
};
|
|
7092
7600
|
};
|
|
7601
|
+
const deserializeAws_restJson1AllowMethodsList = (output, context) => {
|
|
7602
|
+
const retVal = (output || [])
|
|
7603
|
+
.filter((e) => e != null)
|
|
7604
|
+
.map((entry) => {
|
|
7605
|
+
if (entry === null) {
|
|
7606
|
+
return null;
|
|
7607
|
+
}
|
|
7608
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
7609
|
+
});
|
|
7610
|
+
return retVal;
|
|
7611
|
+
};
|
|
7612
|
+
const deserializeAws_restJson1AllowOriginsList = (output, context) => {
|
|
7613
|
+
const retVal = (output || [])
|
|
7614
|
+
.filter((e) => e != null)
|
|
7615
|
+
.map((entry) => {
|
|
7616
|
+
if (entry === null) {
|
|
7617
|
+
return null;
|
|
7618
|
+
}
|
|
7619
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
7620
|
+
});
|
|
7621
|
+
return retVal;
|
|
7622
|
+
};
|
|
7093
7623
|
const deserializeAws_restJson1ArchitecturesList = (output, context) => {
|
|
7094
7624
|
const retVal = (output || [])
|
|
7095
7625
|
.filter((e) => e != null)
|
|
@@ -7158,6 +7688,24 @@ const deserializeAws_restJson1Concurrency = (output, context) => {
|
|
|
7158
7688
|
ReservedConcurrentExecutions: (0, smithy_client_1.expectInt32)(output.ReservedConcurrentExecutions),
|
|
7159
7689
|
};
|
|
7160
7690
|
};
|
|
7691
|
+
const deserializeAws_restJson1Cors = (output, context) => {
|
|
7692
|
+
return {
|
|
7693
|
+
AllowCredentials: (0, smithy_client_1.expectBoolean)(output.AllowCredentials),
|
|
7694
|
+
AllowHeaders: output.AllowHeaders !== undefined && output.AllowHeaders !== null
|
|
7695
|
+
? deserializeAws_restJson1HeadersList(output.AllowHeaders, context)
|
|
7696
|
+
: undefined,
|
|
7697
|
+
AllowMethods: output.AllowMethods !== undefined && output.AllowMethods !== null
|
|
7698
|
+
? deserializeAws_restJson1AllowMethodsList(output.AllowMethods, context)
|
|
7699
|
+
: undefined,
|
|
7700
|
+
AllowOrigins: output.AllowOrigins !== undefined && output.AllowOrigins !== null
|
|
7701
|
+
? deserializeAws_restJson1AllowOriginsList(output.AllowOrigins, context)
|
|
7702
|
+
: undefined,
|
|
7703
|
+
ExposeHeaders: output.ExposeHeaders !== undefined && output.ExposeHeaders !== null
|
|
7704
|
+
? deserializeAws_restJson1HeadersList(output.ExposeHeaders, context)
|
|
7705
|
+
: undefined,
|
|
7706
|
+
MaxAge: (0, smithy_client_1.expectInt32)(output.MaxAge),
|
|
7707
|
+
};
|
|
7708
|
+
};
|
|
7161
7709
|
const deserializeAws_restJson1DeadLetterConfig = (output, context) => {
|
|
7162
7710
|
return {
|
|
7163
7711
|
TargetArn: (0, smithy_client_1.expectString)(output.TargetArn),
|
|
@@ -7443,6 +7991,40 @@ const deserializeAws_restJson1FunctionResponseTypeList = (output, context) => {
|
|
|
7443
7991
|
});
|
|
7444
7992
|
return retVal;
|
|
7445
7993
|
};
|
|
7994
|
+
const deserializeAws_restJson1FunctionUrlConfig = (output, context) => {
|
|
7995
|
+
return {
|
|
7996
|
+
AuthType: (0, smithy_client_1.expectString)(output.AuthType),
|
|
7997
|
+
Cors: output.Cors !== undefined && output.Cors !== null
|
|
7998
|
+
? deserializeAws_restJson1Cors(output.Cors, context)
|
|
7999
|
+
: undefined,
|
|
8000
|
+
CreationTime: (0, smithy_client_1.expectString)(output.CreationTime),
|
|
8001
|
+
FunctionArn: (0, smithy_client_1.expectString)(output.FunctionArn),
|
|
8002
|
+
FunctionUrl: (0, smithy_client_1.expectString)(output.FunctionUrl),
|
|
8003
|
+
LastModifiedTime: (0, smithy_client_1.expectString)(output.LastModifiedTime),
|
|
8004
|
+
};
|
|
8005
|
+
};
|
|
8006
|
+
const deserializeAws_restJson1FunctionUrlConfigList = (output, context) => {
|
|
8007
|
+
const retVal = (output || [])
|
|
8008
|
+
.filter((e) => e != null)
|
|
8009
|
+
.map((entry) => {
|
|
8010
|
+
if (entry === null) {
|
|
8011
|
+
return null;
|
|
8012
|
+
}
|
|
8013
|
+
return deserializeAws_restJson1FunctionUrlConfig(entry, context);
|
|
8014
|
+
});
|
|
8015
|
+
return retVal;
|
|
8016
|
+
};
|
|
8017
|
+
const deserializeAws_restJson1HeadersList = (output, context) => {
|
|
8018
|
+
const retVal = (output || [])
|
|
8019
|
+
.filter((e) => e != null)
|
|
8020
|
+
.map((entry) => {
|
|
8021
|
+
if (entry === null) {
|
|
8022
|
+
return null;
|
|
8023
|
+
}
|
|
8024
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
8025
|
+
});
|
|
8026
|
+
return retVal;
|
|
8027
|
+
};
|
|
7446
8028
|
const deserializeAws_restJson1ImageConfig = (output, context) => {
|
|
7447
8029
|
return {
|
|
7448
8030
|
Command: output.Command !== undefined && output.Command !== null
|