@aws-sdk/client-lambda 3.252.0 → 3.256.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist-cjs/Lambda.js +30 -0
  2. package/dist-cjs/commands/GetRuntimeManagementConfigCommand.js +46 -0
  3. package/dist-cjs/commands/PutRuntimeManagementConfigCommand.js +46 -0
  4. package/dist-cjs/commands/index.js +2 -0
  5. package/dist-cjs/models/models_0.js +40 -5
  6. package/dist-cjs/protocols/Aws_restJson1.js +182 -4
  7. package/dist-es/Lambda.js +30 -0
  8. package/dist-es/commands/GetRuntimeManagementConfigCommand.js +42 -0
  9. package/dist-es/commands/PutRuntimeManagementConfigCommand.js +42 -0
  10. package/dist-es/commands/index.js +2 -0
  11. package/dist-es/models/models_0.js +29 -0
  12. package/dist-es/protocols/Aws_restJson1.js +175 -1
  13. package/dist-types/Lambda.d.ts +23 -6
  14. package/dist-types/LambdaClient.d.ts +10 -8
  15. package/dist-types/commands/CreateAliasCommand.d.ts +1 -1
  16. package/dist-types/commands/DeleteAliasCommand.d.ts +1 -1
  17. package/dist-types/commands/GetAliasCommand.d.ts +1 -1
  18. package/dist-types/commands/GetRuntimeManagementConfigCommand.d.ts +39 -0
  19. package/dist-types/commands/ListAliasesCommand.d.ts +1 -1
  20. package/dist-types/commands/ListFunctionsCommand.d.ts +1 -1
  21. package/dist-types/commands/PutRuntimeManagementConfigCommand.d.ts +38 -0
  22. package/dist-types/commands/UpdateAliasCommand.d.ts +1 -1
  23. package/dist-types/commands/index.d.ts +2 -0
  24. package/dist-types/models/models_0.d.ts +179 -3
  25. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  26. package/dist-types/ts3.4/Lambda.d.ts +34 -0
  27. package/dist-types/ts3.4/LambdaClient.d.ts +16 -3
  28. package/dist-types/ts3.4/commands/GetRuntimeManagementConfigCommand.d.ts +41 -0
  29. package/dist-types/ts3.4/commands/PutRuntimeManagementConfigCommand.d.ts +41 -0
  30. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +51 -0
  32. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  33. package/package.json +32 -32
package/dist-es/Lambda.js CHANGED
@@ -30,6 +30,7 @@ import { GetLayerVersionCommand, } from "./commands/GetLayerVersionCommand";
30
30
  import { GetLayerVersionPolicyCommand, } from "./commands/GetLayerVersionPolicyCommand";
31
31
  import { GetPolicyCommand } from "./commands/GetPolicyCommand";
32
32
  import { GetProvisionedConcurrencyConfigCommand, } from "./commands/GetProvisionedConcurrencyConfigCommand";
33
+ import { GetRuntimeManagementConfigCommand, } from "./commands/GetRuntimeManagementConfigCommand";
33
34
  import { InvokeAsyncCommand } from "./commands/InvokeAsyncCommand";
34
35
  import { InvokeCommand } from "./commands/InvokeCommand";
35
36
  import { ListAliasesCommand } from "./commands/ListAliasesCommand";
@@ -50,6 +51,7 @@ import { PutFunctionCodeSigningConfigCommand, } from "./commands/PutFunctionCode
50
51
  import { PutFunctionConcurrencyCommand, } from "./commands/PutFunctionConcurrencyCommand";
51
52
  import { PutFunctionEventInvokeConfigCommand, } from "./commands/PutFunctionEventInvokeConfigCommand";
52
53
  import { PutProvisionedConcurrencyConfigCommand, } from "./commands/PutProvisionedConcurrencyConfigCommand";
54
+ import { PutRuntimeManagementConfigCommand, } from "./commands/PutRuntimeManagementConfigCommand";
53
55
  import { RemoveLayerVersionPermissionCommand, } from "./commands/RemoveLayerVersionPermissionCommand";
54
56
  import { RemovePermissionCommand, } from "./commands/RemovePermissionCommand";
55
57
  import { TagResourceCommand } from "./commands/TagResourceCommand";
@@ -511,6 +513,20 @@ export class Lambda extends LambdaClient {
511
513
  return this.send(command, optionsOrCb);
512
514
  }
513
515
  }
516
+ getRuntimeManagementConfig(args, optionsOrCb, cb) {
517
+ const command = new GetRuntimeManagementConfigCommand(args);
518
+ if (typeof optionsOrCb === "function") {
519
+ this.send(command, optionsOrCb);
520
+ }
521
+ else if (typeof cb === "function") {
522
+ if (typeof optionsOrCb !== "object")
523
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
524
+ this.send(command, optionsOrCb || {}, cb);
525
+ }
526
+ else {
527
+ return this.send(command, optionsOrCb);
528
+ }
529
+ }
514
530
  invoke(args, optionsOrCb, cb) {
515
531
  const command = new InvokeCommand(args);
516
532
  if (typeof optionsOrCb === "function") {
@@ -791,6 +807,20 @@ export class Lambda extends LambdaClient {
791
807
  return this.send(command, optionsOrCb);
792
808
  }
793
809
  }
810
+ putRuntimeManagementConfig(args, optionsOrCb, cb) {
811
+ const command = new PutRuntimeManagementConfigCommand(args);
812
+ if (typeof optionsOrCb === "function") {
813
+ this.send(command, optionsOrCb);
814
+ }
815
+ else if (typeof cb === "function") {
816
+ if (typeof optionsOrCb !== "object")
817
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
818
+ this.send(command, optionsOrCb || {}, cb);
819
+ }
820
+ else {
821
+ return this.send(command, optionsOrCb);
822
+ }
823
+ }
794
824
  removeLayerVersionPermission(args, optionsOrCb, cb) {
795
825
  const command = new RemoveLayerVersionPermissionCommand(args);
796
826
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { GetRuntimeManagementConfigRequestFilterSensitiveLog, GetRuntimeManagementConfigResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetRuntimeManagementConfigCommand, serializeAws_restJson1GetRuntimeManagementConfigCommand, } from "../protocols/Aws_restJson1";
6
+ export class GetRuntimeManagementConfigCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetRuntimeManagementConfigCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "LambdaClient";
25
+ const commandName = "GetRuntimeManagementConfigCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: GetRuntimeManagementConfigRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: GetRuntimeManagementConfigResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1GetRuntimeManagementConfigCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1GetRuntimeManagementConfigCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { PutRuntimeManagementConfigRequestFilterSensitiveLog, PutRuntimeManagementConfigResponseFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1PutRuntimeManagementConfigCommand, serializeAws_restJson1PutRuntimeManagementConfigCommand, } from "../protocols/Aws_restJson1";
6
+ export class PutRuntimeManagementConfigCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, PutRuntimeManagementConfigCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "LambdaClient";
25
+ const commandName = "PutRuntimeManagementConfigCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: PutRuntimeManagementConfigRequestFilterSensitiveLog,
31
+ outputFilterSensitiveLog: PutRuntimeManagementConfigResponseFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1PutRuntimeManagementConfigCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1PutRuntimeManagementConfigCommand(output, context);
41
+ }
42
+ }
@@ -30,6 +30,7 @@ export * from "./GetLayerVersionCommand";
30
30
  export * from "./GetLayerVersionPolicyCommand";
31
31
  export * from "./GetPolicyCommand";
32
32
  export * from "./GetProvisionedConcurrencyConfigCommand";
33
+ export * from "./GetRuntimeManagementConfigCommand";
33
34
  export * from "./InvokeAsyncCommand";
34
35
  export * from "./InvokeCommand";
35
36
  export * from "./ListAliasesCommand";
@@ -50,6 +51,7 @@ export * from "./PutFunctionCodeSigningConfigCommand";
50
51
  export * from "./PutFunctionConcurrencyCommand";
51
52
  export * from "./PutFunctionEventInvokeConfigCommand";
52
53
  export * from "./PutProvisionedConcurrencyConfigCommand";
54
+ export * from "./PutRuntimeManagementConfigCommand";
53
55
  export * from "./RemoveLayerVersionPermissionCommand";
54
56
  export * from "./RemovePermissionCommand";
55
57
  export * from "./TagResourceCommand";
@@ -347,6 +347,12 @@ export class ProvisionedConcurrencyConfigNotFoundException extends __BaseExcepti
347
347
  this.Type = opts.Type;
348
348
  }
349
349
  }
350
+ export var UpdateRuntimeOn;
351
+ (function (UpdateRuntimeOn) {
352
+ UpdateRuntimeOn["Auto"] = "Auto";
353
+ UpdateRuntimeOn["FunctionUpdate"] = "FunctionUpdate";
354
+ UpdateRuntimeOn["Manual"] = "Manual";
355
+ })(UpdateRuntimeOn || (UpdateRuntimeOn = {}));
350
356
  export class EC2AccessDeniedException extends __BaseException {
351
357
  constructor(opts) {
352
358
  super({
@@ -827,6 +833,14 @@ export const ImageConfigResponseFilterSensitiveLog = (obj) => ({
827
833
  export const LayerFilterSensitiveLog = (obj) => ({
828
834
  ...obj,
829
835
  });
836
+ export const RuntimeVersionErrorFilterSensitiveLog = (obj) => ({
837
+ ...obj,
838
+ ...(obj.Message && { Message: SENSITIVE_STRING }),
839
+ });
840
+ export const RuntimeVersionConfigFilterSensitiveLog = (obj) => ({
841
+ ...obj,
842
+ ...(obj.Error && { Error: RuntimeVersionErrorFilterSensitiveLog(obj.Error) }),
843
+ });
830
844
  export const SnapStartResponseFilterSensitiveLog = (obj) => ({
831
845
  ...obj,
832
846
  });
@@ -842,6 +856,9 @@ export const FunctionConfigurationFilterSensitiveLog = (obj) => ({
842
856
  ...(obj.ImageConfigResponse && {
843
857
  ImageConfigResponse: ImageConfigResponseFilterSensitiveLog(obj.ImageConfigResponse),
844
858
  }),
859
+ ...(obj.RuntimeVersionConfig && {
860
+ RuntimeVersionConfig: RuntimeVersionConfigFilterSensitiveLog(obj.RuntimeVersionConfig),
861
+ }),
845
862
  });
846
863
  export const CorsFilterSensitiveLog = (obj) => ({
847
864
  ...obj,
@@ -973,6 +990,12 @@ export const GetProvisionedConcurrencyConfigRequestFilterSensitiveLog = (obj) =>
973
990
  export const GetProvisionedConcurrencyConfigResponseFilterSensitiveLog = (obj) => ({
974
991
  ...obj,
975
992
  });
993
+ export const GetRuntimeManagementConfigRequestFilterSensitiveLog = (obj) => ({
994
+ ...obj,
995
+ });
996
+ export const GetRuntimeManagementConfigResponseFilterSensitiveLog = (obj) => ({
997
+ ...obj,
998
+ });
976
999
  export const InvocationRequestFilterSensitiveLog = (obj) => ({
977
1000
  ...obj,
978
1001
  ...(obj.Payload && { Payload: SENSITIVE_STRING }),
@@ -1105,6 +1128,12 @@ export const PutProvisionedConcurrencyConfigRequestFilterSensitiveLog = (obj) =>
1105
1128
  export const PutProvisionedConcurrencyConfigResponseFilterSensitiveLog = (obj) => ({
1106
1129
  ...obj,
1107
1130
  });
1131
+ export const PutRuntimeManagementConfigRequestFilterSensitiveLog = (obj) => ({
1132
+ ...obj,
1133
+ });
1134
+ export const PutRuntimeManagementConfigResponseFilterSensitiveLog = (obj) => ({
1135
+ ...obj,
1136
+ });
1108
1137
  export const RemoveLayerVersionPermissionRequestFilterSensitiveLog = (obj) => ({
1109
1138
  ...obj,
1110
1139
  });
@@ -165,7 +165,7 @@ export const serializeAws_restJson1CreateEventSourceMappingCommand = async (inpu
165
165
  }),
166
166
  ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }),
167
167
  ...(input.StartingPositionTimestamp != null && {
168
- StartingPositionTimestamp: Math.round(input.StartingPositionTimestamp.getTime() / 1000).toString(),
168
+ StartingPositionTimestamp: Math.round(input.StartingPositionTimestamp.getTime() / 1000),
169
169
  }),
170
170
  ...(input.Topics != null && { Topics: serializeAws_restJson1Topics(input.Topics, context) }),
171
171
  ...(input.TumblingWindowInSeconds != null && { TumblingWindowInSeconds: input.TumblingWindowInSeconds }),
@@ -726,6 +726,27 @@ export const serializeAws_restJson1GetProvisionedConcurrencyConfigCommand = asyn
726
726
  body,
727
727
  });
728
728
  };
729
+ export const serializeAws_restJson1GetRuntimeManagementConfigCommand = async (input, context) => {
730
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
731
+ const headers = {};
732
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
733
+ "/2021-07-20/functions/{FunctionName}/runtime-management-config";
734
+ resolvedPath = __resolvedPath(resolvedPath, input, "FunctionName", () => input.FunctionName, "{FunctionName}", false);
735
+ const query = map({
736
+ Qualifier: [, input.Qualifier],
737
+ });
738
+ let body;
739
+ return new __HttpRequest({
740
+ protocol,
741
+ hostname,
742
+ port,
743
+ method: "GET",
744
+ headers,
745
+ path: resolvedPath,
746
+ query,
747
+ body,
748
+ });
749
+ };
729
750
  export const serializeAws_restJson1InvokeCommand = async (input, context) => {
730
751
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
731
752
  const headers = map({}, isSerializableHeaderValue, {
@@ -1192,6 +1213,33 @@ export const serializeAws_restJson1PutProvisionedConcurrencyConfigCommand = asyn
1192
1213
  body,
1193
1214
  });
1194
1215
  };
1216
+ export const serializeAws_restJson1PutRuntimeManagementConfigCommand = async (input, context) => {
1217
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1218
+ const headers = {
1219
+ "content-type": "application/json",
1220
+ };
1221
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1222
+ "/2021-07-20/functions/{FunctionName}/runtime-management-config";
1223
+ resolvedPath = __resolvedPath(resolvedPath, input, "FunctionName", () => input.FunctionName, "{FunctionName}", false);
1224
+ const query = map({
1225
+ Qualifier: [, input.Qualifier],
1226
+ });
1227
+ let body;
1228
+ body = JSON.stringify({
1229
+ ...(input.RuntimeVersionArn != null && { RuntimeVersionArn: input.RuntimeVersionArn }),
1230
+ ...(input.UpdateRuntimeOn != null && { UpdateRuntimeOn: input.UpdateRuntimeOn }),
1231
+ });
1232
+ return new __HttpRequest({
1233
+ protocol,
1234
+ hostname,
1235
+ port,
1236
+ method: "PUT",
1237
+ headers,
1238
+ path: resolvedPath,
1239
+ query,
1240
+ body,
1241
+ });
1242
+ };
1195
1243
  export const serializeAws_restJson1RemoveLayerVersionPermissionCommand = async (input, context) => {
1196
1244
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1197
1245
  const headers = {};
@@ -1918,6 +1966,9 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (output, cont
1918
1966
  if (data.Runtime != null) {
1919
1967
  contents.Runtime = __expectString(data.Runtime);
1920
1968
  }
1969
+ if (data.RuntimeVersionConfig != null) {
1970
+ contents.RuntimeVersionConfig = deserializeAws_restJson1RuntimeVersionConfig(data.RuntimeVersionConfig, context);
1971
+ }
1921
1972
  if (data.SigningJobArn != null) {
1922
1973
  contents.SigningJobArn = __expectString(data.SigningJobArn);
1923
1974
  }
@@ -3004,6 +3055,9 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (ou
3004
3055
  if (data.Runtime != null) {
3005
3056
  contents.Runtime = __expectString(data.Runtime);
3006
3057
  }
3058
+ if (data.RuntimeVersionConfig != null) {
3059
+ contents.RuntimeVersionConfig = deserializeAws_restJson1RuntimeVersionConfig(data.RuntimeVersionConfig, context);
3060
+ }
3007
3061
  if (data.SigningJobArn != null) {
3008
3062
  contents.SigningJobArn = __expectString(data.SigningJobArn);
3009
3063
  }
@@ -3458,6 +3512,51 @@ const deserializeAws_restJson1GetProvisionedConcurrencyConfigCommandError = asyn
3458
3512
  });
3459
3513
  }
3460
3514
  };
3515
+ export const deserializeAws_restJson1GetRuntimeManagementConfigCommand = async (output, context) => {
3516
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3517
+ return deserializeAws_restJson1GetRuntimeManagementConfigCommandError(output, context);
3518
+ }
3519
+ const contents = map({
3520
+ $metadata: deserializeMetadata(output),
3521
+ });
3522
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3523
+ if (data.RuntimeVersionArn != null) {
3524
+ contents.RuntimeVersionArn = __expectString(data.RuntimeVersionArn);
3525
+ }
3526
+ if (data.UpdateRuntimeOn != null) {
3527
+ contents.UpdateRuntimeOn = __expectString(data.UpdateRuntimeOn);
3528
+ }
3529
+ return contents;
3530
+ };
3531
+ const deserializeAws_restJson1GetRuntimeManagementConfigCommandError = async (output, context) => {
3532
+ const parsedOutput = {
3533
+ ...output,
3534
+ body: await parseErrorBody(output.body, context),
3535
+ };
3536
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3537
+ switch (errorCode) {
3538
+ case "InvalidParameterValueException":
3539
+ case "com.amazonaws.lambda#InvalidParameterValueException":
3540
+ throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
3541
+ case "ResourceNotFoundException":
3542
+ case "com.amazonaws.lambda#ResourceNotFoundException":
3543
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3544
+ case "ServiceException":
3545
+ case "com.amazonaws.lambda#ServiceException":
3546
+ throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
3547
+ case "TooManyRequestsException":
3548
+ case "com.amazonaws.lambda#TooManyRequestsException":
3549
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3550
+ default:
3551
+ const parsedBody = parsedOutput.body;
3552
+ throwDefaultError({
3553
+ output,
3554
+ parsedBody,
3555
+ exceptionCtor: __BaseException,
3556
+ errorCode,
3557
+ });
3558
+ }
3559
+ };
3461
3560
  export const deserializeAws_restJson1InvokeCommand = async (output, context) => {
3462
3561
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3463
3562
  return deserializeAws_restJson1InvokeCommandError(output, context);
@@ -4295,6 +4394,9 @@ export const deserializeAws_restJson1PublishVersionCommand = async (output, cont
4295
4394
  if (data.Runtime != null) {
4296
4395
  contents.Runtime = __expectString(data.Runtime);
4297
4396
  }
4397
+ if (data.RuntimeVersionConfig != null) {
4398
+ contents.RuntimeVersionConfig = deserializeAws_restJson1RuntimeVersionConfig(data.RuntimeVersionConfig, context);
4399
+ }
4298
4400
  if (data.SigningJobArn != null) {
4299
4401
  contents.SigningJobArn = __expectString(data.SigningJobArn);
4300
4402
  }
@@ -4578,6 +4680,57 @@ const deserializeAws_restJson1PutProvisionedConcurrencyConfigCommandError = asyn
4578
4680
  });
4579
4681
  }
4580
4682
  };
4683
+ export const deserializeAws_restJson1PutRuntimeManagementConfigCommand = async (output, context) => {
4684
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4685
+ return deserializeAws_restJson1PutRuntimeManagementConfigCommandError(output, context);
4686
+ }
4687
+ const contents = map({
4688
+ $metadata: deserializeMetadata(output),
4689
+ });
4690
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4691
+ if (data.FunctionArn != null) {
4692
+ contents.FunctionArn = __expectString(data.FunctionArn);
4693
+ }
4694
+ if (data.RuntimeVersionArn != null) {
4695
+ contents.RuntimeVersionArn = __expectString(data.RuntimeVersionArn);
4696
+ }
4697
+ if (data.UpdateRuntimeOn != null) {
4698
+ contents.UpdateRuntimeOn = __expectString(data.UpdateRuntimeOn);
4699
+ }
4700
+ return contents;
4701
+ };
4702
+ const deserializeAws_restJson1PutRuntimeManagementConfigCommandError = async (output, context) => {
4703
+ const parsedOutput = {
4704
+ ...output,
4705
+ body: await parseErrorBody(output.body, context),
4706
+ };
4707
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4708
+ switch (errorCode) {
4709
+ case "InvalidParameterValueException":
4710
+ case "com.amazonaws.lambda#InvalidParameterValueException":
4711
+ throw await deserializeAws_restJson1InvalidParameterValueExceptionResponse(parsedOutput, context);
4712
+ case "ResourceConflictException":
4713
+ case "com.amazonaws.lambda#ResourceConflictException":
4714
+ throw await deserializeAws_restJson1ResourceConflictExceptionResponse(parsedOutput, context);
4715
+ case "ResourceNotFoundException":
4716
+ case "com.amazonaws.lambda#ResourceNotFoundException":
4717
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
4718
+ case "ServiceException":
4719
+ case "com.amazonaws.lambda#ServiceException":
4720
+ throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
4721
+ case "TooManyRequestsException":
4722
+ case "com.amazonaws.lambda#TooManyRequestsException":
4723
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4724
+ default:
4725
+ const parsedBody = parsedOutput.body;
4726
+ throwDefaultError({
4727
+ output,
4728
+ parsedBody,
4729
+ exceptionCtor: __BaseException,
4730
+ errorCode,
4731
+ });
4732
+ }
4733
+ };
4581
4734
  export const deserializeAws_restJson1RemoveLayerVersionPermissionCommand = async (output, context) => {
4582
4735
  if (output.statusCode !== 204 && output.statusCode >= 300) {
4583
4736
  return deserializeAws_restJson1RemoveLayerVersionPermissionCommandError(output, context);
@@ -5051,6 +5204,9 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (output,
5051
5204
  if (data.Runtime != null) {
5052
5205
  contents.Runtime = __expectString(data.Runtime);
5053
5206
  }
5207
+ if (data.RuntimeVersionConfig != null) {
5208
+ contents.RuntimeVersionConfig = deserializeAws_restJson1RuntimeVersionConfig(data.RuntimeVersionConfig, context);
5209
+ }
5054
5210
  if (data.SigningJobArn != null) {
5055
5211
  contents.SigningJobArn = __expectString(data.SigningJobArn);
5056
5212
  }
@@ -5210,6 +5366,9 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
5210
5366
  if (data.Runtime != null) {
5211
5367
  contents.Runtime = __expectString(data.Runtime);
5212
5368
  }
5369
+ if (data.RuntimeVersionConfig != null) {
5370
+ contents.RuntimeVersionConfig = deserializeAws_restJson1RuntimeVersionConfig(data.RuntimeVersionConfig, context);
5371
+ }
5213
5372
  if (data.SigningJobArn != null) {
5214
5373
  contents.SigningJobArn = __expectString(data.SigningJobArn);
5215
5374
  }
@@ -6656,6 +6815,9 @@ const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
6656
6815
  RevisionId: __expectString(output.RevisionId),
6657
6816
  Role: __expectString(output.Role),
6658
6817
  Runtime: __expectString(output.Runtime),
6818
+ RuntimeVersionConfig: output.RuntimeVersionConfig != null
6819
+ ? deserializeAws_restJson1RuntimeVersionConfig(output.RuntimeVersionConfig, context)
6820
+ : undefined,
6659
6821
  SigningJobArn: __expectString(output.SigningJobArn),
6660
6822
  SigningProfileVersionArn: __expectString(output.SigningProfileVersionArn),
6661
6823
  SnapStart: output.SnapStart != null ? deserializeAws_restJson1SnapStartResponse(output.SnapStart, context) : undefined,
@@ -6884,6 +7046,18 @@ const deserializeAws_restJson1Queues = (output, context) => {
6884
7046
  });
6885
7047
  return retVal;
6886
7048
  };
7049
+ const deserializeAws_restJson1RuntimeVersionConfig = (output, context) => {
7050
+ return {
7051
+ Error: output.Error != null ? deserializeAws_restJson1RuntimeVersionError(output.Error, context) : undefined,
7052
+ RuntimeVersionArn: __expectString(output.RuntimeVersionArn),
7053
+ };
7054
+ };
7055
+ const deserializeAws_restJson1RuntimeVersionError = (output, context) => {
7056
+ return {
7057
+ ErrorCode: __expectString(output.ErrorCode),
7058
+ Message: __expectString(output.Message),
7059
+ };
7060
+ };
6887
7061
  const deserializeAws_restJson1ScalingConfig = (output, context) => {
6888
7062
  return {
6889
7063
  MaximumConcurrency: __expectInt32(output.MaximumConcurrency),
@@ -31,6 +31,7 @@ import { GetLayerVersionCommandInput, GetLayerVersionCommandOutput } from "./com
31
31
  import { GetLayerVersionPolicyCommandInput, GetLayerVersionPolicyCommandOutput } from "./commands/GetLayerVersionPolicyCommand";
32
32
  import { GetPolicyCommandInput, GetPolicyCommandOutput } from "./commands/GetPolicyCommand";
33
33
  import { GetProvisionedConcurrencyConfigCommandInput, GetProvisionedConcurrencyConfigCommandOutput } from "./commands/GetProvisionedConcurrencyConfigCommand";
34
+ import { GetRuntimeManagementConfigCommandInput, GetRuntimeManagementConfigCommandOutput } from "./commands/GetRuntimeManagementConfigCommand";
34
35
  import { InvokeAsyncCommandInput, InvokeAsyncCommandOutput } from "./commands/InvokeAsyncCommand";
35
36
  import { InvokeCommandInput, InvokeCommandOutput } from "./commands/InvokeCommand";
36
37
  import { ListAliasesCommandInput, ListAliasesCommandOutput } from "./commands/ListAliasesCommand";
@@ -51,6 +52,7 @@ import { PutFunctionCodeSigningConfigCommandInput, PutFunctionCodeSigningConfigC
51
52
  import { PutFunctionConcurrencyCommandInput, PutFunctionConcurrencyCommandOutput } from "./commands/PutFunctionConcurrencyCommand";
52
53
  import { PutFunctionEventInvokeConfigCommandInput, PutFunctionEventInvokeConfigCommandOutput } from "./commands/PutFunctionEventInvokeConfigCommand";
53
54
  import { PutProvisionedConcurrencyConfigCommandInput, PutProvisionedConcurrencyConfigCommandOutput } from "./commands/PutProvisionedConcurrencyConfigCommand";
55
+ import { PutRuntimeManagementConfigCommandInput, PutRuntimeManagementConfigCommandOutput } from "./commands/PutRuntimeManagementConfigCommand";
54
56
  import { RemoveLayerVersionPermissionCommandInput, RemoveLayerVersionPermissionCommandOutput } from "./commands/RemoveLayerVersionPermissionCommand";
55
57
  import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "./commands/RemovePermissionCommand";
56
58
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -161,7 +163,7 @@ export declare class Lambda extends LambdaClient {
161
163
  addPermission(args: AddPermissionCommandInput, cb: (err: any, data?: AddPermissionCommandOutput) => void): void;
162
164
  addPermission(args: AddPermissionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AddPermissionCommandOutput) => void): void;
163
165
  /**
164
- * <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a> for a
166
+ * <p>Creates an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a> for a
165
167
  * Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a
166
168
  * different version.</p>
167
169
  * <p>You can also map an alias to split invocation requests between two versions. Use the
@@ -337,7 +339,7 @@ export declare class Lambda extends LambdaClient {
337
339
  createFunctionUrlConfig(args: CreateFunctionUrlConfigCommandInput, cb: (err: any, data?: CreateFunctionUrlConfigCommandOutput) => void): void;
338
340
  createFunctionUrlConfig(args: CreateFunctionUrlConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateFunctionUrlConfigCommandOutput) => void): void;
339
341
  /**
340
- * <p>Deletes a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
342
+ * <p>Deletes a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a>.</p>
341
343
  */
342
344
  deleteAlias(args: DeleteAliasCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAliasCommandOutput>;
343
345
  deleteAlias(args: DeleteAliasCommandInput, cb: (err: any, data?: DeleteAliasCommandOutput) => void): void;
@@ -414,7 +416,7 @@ export declare class Lambda extends LambdaClient {
414
416
  getAccountSettings(args: GetAccountSettingsCommandInput, cb: (err: any, data?: GetAccountSettingsCommandOutput) => void): void;
415
417
  getAccountSettings(args: GetAccountSettingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountSettingsCommandOutput) => void): void;
416
418
  /**
417
- * <p>Returns details about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
419
+ * <p>Returns details about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a>.</p>
418
420
  */
419
421
  getAlias(args: GetAliasCommandInput, options?: __HttpHandlerOptions): Promise<GetAliasCommandOutput>;
420
422
  getAlias(args: GetAliasCommandInput, cb: (err: any, data?: GetAliasCommandOutput) => void): void;
@@ -509,6 +511,14 @@ export declare class Lambda extends LambdaClient {
509
511
  getProvisionedConcurrencyConfig(args: GetProvisionedConcurrencyConfigCommandInput, options?: __HttpHandlerOptions): Promise<GetProvisionedConcurrencyConfigCommandOutput>;
510
512
  getProvisionedConcurrencyConfig(args: GetProvisionedConcurrencyConfigCommandInput, cb: (err: any, data?: GetProvisionedConcurrencyConfigCommandOutput) => void): void;
511
513
  getProvisionedConcurrencyConfig(args: GetProvisionedConcurrencyConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetProvisionedConcurrencyConfigCommandOutput) => void): void;
514
+ /**
515
+ * <p>Retrieves the runtime management configuration for a function's version. If the runtime update mode is <b>Manual</b>, this includes the ARN of the
516
+ * runtime version and the runtime update mode. If the runtime update mode is <b>Auto</b> or <b>Function update</b>,
517
+ * this includes the runtime update mode and <code>null</code> is returned for the ARN. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html">Runtime updates</a>.</p>
518
+ */
519
+ getRuntimeManagementConfig(args: GetRuntimeManagementConfigCommandInput, options?: __HttpHandlerOptions): Promise<GetRuntimeManagementConfigCommandOutput>;
520
+ getRuntimeManagementConfig(args: GetRuntimeManagementConfigCommandInput, cb: (err: any, data?: GetRuntimeManagementConfigCommandOutput) => void): void;
521
+ getRuntimeManagementConfig(args: GetRuntimeManagementConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRuntimeManagementConfigCommandOutput) => void): void;
512
522
  /**
513
523
  * <p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or
514
524
  * asynchronously. To invoke a function asynchronously, set <code>InvocationType</code> to <code>Event</code>.</p>
@@ -551,7 +561,7 @@ export declare class Lambda extends LambdaClient {
551
561
  invokeAsync(args: InvokeAsyncCommandInput, cb: (err: any, data?: InvokeAsyncCommandOutput) => void): void;
552
562
  invokeAsync(args: InvokeAsyncCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeAsyncCommandOutput) => void): void;
553
563
  /**
554
- * <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">aliases</a>
564
+ * <p>Returns a list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">aliases</a>
555
565
  * for a Lambda function.</p>
556
566
  */
557
567
  listAliases(args: ListAliasesCommandInput, options?: __HttpHandlerOptions): Promise<ListAliasesCommandOutput>;
@@ -587,7 +597,7 @@ export declare class Lambda extends LambdaClient {
587
597
  * <note>
588
598
  * <p>The <code>ListFunctions</code> operation returns a subset of the <a>FunctionConfiguration</a> fields.
589
599
  * To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason,
590
- * LastUpdateStatusReasonCode) for a function or version, use <a>GetFunction</a>.</p>
600
+ * LastUpdateStatusReasonCode, RuntimeVersionConfig) for a function or version, use <a>GetFunction</a>.</p>
591
601
  * </note>
592
602
  */
593
603
  listFunctions(args: ListFunctionsCommandInput, options?: __HttpHandlerOptions): Promise<ListFunctionsCommandOutput>;
@@ -710,6 +720,13 @@ export declare class Lambda extends LambdaClient {
710
720
  putProvisionedConcurrencyConfig(args: PutProvisionedConcurrencyConfigCommandInput, options?: __HttpHandlerOptions): Promise<PutProvisionedConcurrencyConfigCommandOutput>;
711
721
  putProvisionedConcurrencyConfig(args: PutProvisionedConcurrencyConfigCommandInput, cb: (err: any, data?: PutProvisionedConcurrencyConfigCommandOutput) => void): void;
712
722
  putProvisionedConcurrencyConfig(args: PutProvisionedConcurrencyConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutProvisionedConcurrencyConfigCommandOutput) => void): void;
723
+ /**
724
+ * <p>Sets the runtime management configuration for a function's version. For more information,
725
+ * see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html">Runtime updates</a>.</p>
726
+ */
727
+ putRuntimeManagementConfig(args: PutRuntimeManagementConfigCommandInput, options?: __HttpHandlerOptions): Promise<PutRuntimeManagementConfigCommandOutput>;
728
+ putRuntimeManagementConfig(args: PutRuntimeManagementConfigCommandInput, cb: (err: any, data?: PutRuntimeManagementConfigCommandOutput) => void): void;
729
+ putRuntimeManagementConfig(args: PutRuntimeManagementConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutRuntimeManagementConfigCommandOutput) => void): void;
713
730
  /**
714
731
  * <p>Removes a statement from the permissions policy for a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">Lambda
715
732
  * layer</a>. For more information, see
@@ -738,7 +755,7 @@ export declare class Lambda extends LambdaClient {
738
755
  untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
739
756
  untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
740
757
  /**
741
- * <p>Updates the configuration of a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html">alias</a>.</p>
758
+ * <p>Updates the configuration of a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a>.</p>
742
759
  */
743
760
  updateAlias(args: UpdateAliasCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAliasCommandOutput>;
744
761
  updateAlias(args: UpdateAliasCommandInput, cb: (err: any, data?: UpdateAliasCommandOutput) => void): void;