@aws-sdk/client-lambda 3.354.0 → 3.357.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KMSAccessDeniedException = exports.LogType = exports.InvocationType = exports.InvalidZipFileException = exports.InvalidSubnetIDException = exports.InvalidSecurityGroupIDException = exports.InvalidRuntimeException = exports.InvalidRequestContentException = exports.ENILimitReachedException = exports.EFSMountTimeoutException = exports.EFSMountFailureException = exports.EFSMountConnectivityException = exports.EFSIOException = exports.EC2UnexpectedException = exports.EC2ThrottledException = exports.EC2AccessDeniedException = exports.UpdateRuntimeOn = exports.ProvisionedConcurrencyConfigNotFoundException = exports.ProvisionedConcurrencyStatusEnum = exports.ResourceInUseException = exports.InvokeMode = exports.InvalidCodeSignatureException = exports.StateReasonCode = exports.State = exports.SnapStartOptimizationStatus = exports.LastUpdateStatusReasonCode = exports.LastUpdateStatus = exports.TracingMode = exports.SnapStartApplyOn = exports.Runtime = exports.PackageType = exports.CodeVerificationFailedException = exports.CodeStorageExceededException = exports.CodeSigningConfigNotFoundException = exports.EventSourcePosition = exports.SourceAccessType = exports.EndPointType = exports.FunctionResponseType = exports.FullDocument = exports.CodeSigningPolicy = exports.Architecture = exports.FunctionUrlAuthType = exports.TooManyRequestsException = exports.ThrottleReason = exports.ServiceException = exports.ResourceNotFoundException = exports.ResourceConflictException = exports.PreconditionFailedException = exports.PolicyLengthExceededException = exports.InvalidParameterValueException = void 0;
4
- exports.UpdateFunctionConfigurationRequestFilterSensitiveLog = exports.UpdateFunctionCodeRequestFilterSensitiveLog = exports.PublishLayerVersionRequestFilterSensitiveLog = exports.LayerVersionContentInputFilterSensitiveLog = exports.ListVersionsByFunctionResponseFilterSensitiveLog = exports.ListFunctionsResponseFilterSensitiveLog = exports.InvokeWithResponseStreamResponseFilterSensitiveLog = exports.InvokeWithResponseStreamResponseEventFilterSensitiveLog = exports.InvokeResponseStreamUpdateFilterSensitiveLog = exports.InvokeWithResponseStreamRequestFilterSensitiveLog = exports.InvokeAsyncRequestFilterSensitiveLog = exports.InvocationResponseFilterSensitiveLog = exports.InvocationRequestFilterSensitiveLog = exports.GetFunctionResponseFilterSensitiveLog = exports.FunctionConfigurationFilterSensitiveLog = exports.RuntimeVersionConfigFilterSensitiveLog = exports.RuntimeVersionErrorFilterSensitiveLog = exports.ImageConfigResponseFilterSensitiveLog = exports.ImageConfigErrorFilterSensitiveLog = exports.EnvironmentResponseFilterSensitiveLog = exports.EnvironmentErrorFilterSensitiveLog = exports.CreateFunctionRequestFilterSensitiveLog = exports.EnvironmentFilterSensitiveLog = exports.FunctionCodeFilterSensitiveLog = exports.FunctionVersion = exports.InvokeWithResponseStreamResponseEvent = exports.ResponseStreamingInvocationType = exports.UnsupportedMediaTypeException = exports.SubnetIPAddressLimitReachedException = exports.SnapStartTimeoutException = exports.SnapStartNotReadyException = exports.SnapStartException = exports.ResourceNotReadyException = exports.RequestTooLargeException = exports.KMSNotFoundException = exports.KMSInvalidStateException = exports.KMSDisabledException = void 0;
4
+ exports.UpdateFunctionConfigurationRequestFilterSensitiveLog = exports.UpdateFunctionCodeRequestFilterSensitiveLog = exports.PublishLayerVersionRequestFilterSensitiveLog = exports.LayerVersionContentInputFilterSensitiveLog = exports.ListVersionsByFunctionResponseFilterSensitiveLog = exports.ListFunctionsResponseFilterSensitiveLog = exports.InvokeWithResponseStreamResponseFilterSensitiveLog = exports.InvokeWithResponseStreamResponseEventFilterSensitiveLog = exports.InvokeResponseStreamUpdateFilterSensitiveLog = exports.InvokeWithResponseStreamRequestFilterSensitiveLog = exports.InvokeAsyncRequestFilterSensitiveLog = exports.InvocationResponseFilterSensitiveLog = exports.InvocationRequestFilterSensitiveLog = exports.GetFunctionResponseFilterSensitiveLog = exports.FunctionConfigurationFilterSensitiveLog = exports.RuntimeVersionConfigFilterSensitiveLog = exports.RuntimeVersionErrorFilterSensitiveLog = exports.ImageConfigResponseFilterSensitiveLog = exports.ImageConfigErrorFilterSensitiveLog = exports.EnvironmentResponseFilterSensitiveLog = exports.EnvironmentErrorFilterSensitiveLog = exports.CreateFunctionRequestFilterSensitiveLog = exports.EnvironmentFilterSensitiveLog = exports.FunctionCodeFilterSensitiveLog = exports.FunctionVersion = exports.InvokeWithResponseStreamResponseEvent = exports.ResponseStreamingInvocationType = exports.UnsupportedMediaTypeException = exports.SubnetIPAddressLimitReachedException = exports.SnapStartTimeoutException = exports.SnapStartNotReadyException = exports.SnapStartException = exports.ResourceNotReadyException = exports.RequestTooLargeException = exports.RecursiveInvocationException = exports.KMSNotFoundException = exports.KMSInvalidStateException = exports.KMSDisabledException = void 0;
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const LambdaServiceException_1 = require("./LambdaServiceException");
7
7
  class InvalidParameterValueException extends LambdaServiceException_1.LambdaServiceException {
@@ -626,6 +626,21 @@ class KMSNotFoundException extends LambdaServiceException_1.LambdaServiceExcepti
626
626
  }
627
627
  }
628
628
  exports.KMSNotFoundException = KMSNotFoundException;
629
+ class RecursiveInvocationException extends LambdaServiceException_1.LambdaServiceException {
630
+ constructor(opts) {
631
+ super({
632
+ name: "RecursiveInvocationException",
633
+ $fault: "client",
634
+ ...opts,
635
+ });
636
+ this.name = "RecursiveInvocationException";
637
+ this.$fault = "client";
638
+ Object.setPrototypeOf(this, RecursiveInvocationException.prototype);
639
+ this.Type = opts.Type;
640
+ this.Message = opts.Message;
641
+ }
642
+ }
643
+ exports.RecursiveInvocationException = RecursiveInvocationException;
629
644
  class RequestTooLargeException extends LambdaServiceException_1.LambdaServiceException {
630
645
  constructor(opts) {
631
646
  super({
@@ -2008,7 +2008,7 @@ const de_DeleteAliasCommand = async (output, context) => {
2008
2008
  const contents = (0, smithy_client_1.map)({
2009
2009
  $metadata: deserializeMetadata(output),
2010
2010
  });
2011
- await collectBody(output.body, context);
2011
+ await (0, smithy_client_1.collectBody)(output.body, context);
2012
2012
  return contents;
2013
2013
  };
2014
2014
  exports.de_DeleteAliasCommand = de_DeleteAliasCommand;
@@ -2047,7 +2047,7 @@ const de_DeleteCodeSigningConfigCommand = async (output, context) => {
2047
2047
  const contents = (0, smithy_client_1.map)({
2048
2048
  $metadata: deserializeMetadata(output),
2049
2049
  });
2050
- await collectBody(output.body, context);
2050
+ await (0, smithy_client_1.collectBody)(output.body, context);
2051
2051
  return contents;
2052
2052
  };
2053
2053
  exports.de_DeleteCodeSigningConfigCommand = de_DeleteCodeSigningConfigCommand;
@@ -2158,7 +2158,7 @@ const de_DeleteFunctionCommand = async (output, context) => {
2158
2158
  const contents = (0, smithy_client_1.map)({
2159
2159
  $metadata: deserializeMetadata(output),
2160
2160
  });
2161
- await collectBody(output.body, context);
2161
+ await (0, smithy_client_1.collectBody)(output.body, context);
2162
2162
  return contents;
2163
2163
  };
2164
2164
  exports.de_DeleteFunctionCommand = de_DeleteFunctionCommand;
@@ -2200,7 +2200,7 @@ const de_DeleteFunctionCodeSigningConfigCommand = async (output, context) => {
2200
2200
  const contents = (0, smithy_client_1.map)({
2201
2201
  $metadata: deserializeMetadata(output),
2202
2202
  });
2203
- await collectBody(output.body, context);
2203
+ await (0, smithy_client_1.collectBody)(output.body, context);
2204
2204
  return contents;
2205
2205
  };
2206
2206
  exports.de_DeleteFunctionCodeSigningConfigCommand = de_DeleteFunctionCodeSigningConfigCommand;
@@ -2245,7 +2245,7 @@ const de_DeleteFunctionConcurrencyCommand = async (output, context) => {
2245
2245
  const contents = (0, smithy_client_1.map)({
2246
2246
  $metadata: deserializeMetadata(output),
2247
2247
  });
2248
- await collectBody(output.body, context);
2248
+ await (0, smithy_client_1.collectBody)(output.body, context);
2249
2249
  return contents;
2250
2250
  };
2251
2251
  exports.de_DeleteFunctionConcurrencyCommand = de_DeleteFunctionConcurrencyCommand;
@@ -2287,7 +2287,7 @@ const de_DeleteFunctionEventInvokeConfigCommand = async (output, context) => {
2287
2287
  const contents = (0, smithy_client_1.map)({
2288
2288
  $metadata: deserializeMetadata(output),
2289
2289
  });
2290
- await collectBody(output.body, context);
2290
+ await (0, smithy_client_1.collectBody)(output.body, context);
2291
2291
  return contents;
2292
2292
  };
2293
2293
  exports.de_DeleteFunctionEventInvokeConfigCommand = de_DeleteFunctionEventInvokeConfigCommand;
@@ -2329,7 +2329,7 @@ const de_DeleteFunctionUrlConfigCommand = async (output, context) => {
2329
2329
  const contents = (0, smithy_client_1.map)({
2330
2330
  $metadata: deserializeMetadata(output),
2331
2331
  });
2332
- await collectBody(output.body, context);
2332
+ await (0, smithy_client_1.collectBody)(output.body, context);
2333
2333
  return contents;
2334
2334
  };
2335
2335
  exports.de_DeleteFunctionUrlConfigCommand = de_DeleteFunctionUrlConfigCommand;
@@ -2368,7 +2368,7 @@ const de_DeleteLayerVersionCommand = async (output, context) => {
2368
2368
  const contents = (0, smithy_client_1.map)({
2369
2369
  $metadata: deserializeMetadata(output),
2370
2370
  });
2371
- await collectBody(output.body, context);
2371
+ await (0, smithy_client_1.collectBody)(output.body, context);
2372
2372
  return contents;
2373
2373
  };
2374
2374
  exports.de_DeleteLayerVersionCommand = de_DeleteLayerVersionCommand;
@@ -2401,7 +2401,7 @@ const de_DeleteProvisionedConcurrencyConfigCommand = async (output, context) =>
2401
2401
  const contents = (0, smithy_client_1.map)({
2402
2402
  $metadata: deserializeMetadata(output),
2403
2403
  });
2404
- await collectBody(output.body, context);
2404
+ await (0, smithy_client_1.collectBody)(output.body, context);
2405
2405
  return contents;
2406
2406
  };
2407
2407
  exports.de_DeleteProvisionedConcurrencyConfigCommand = de_DeleteProvisionedConcurrencyConfigCommand;
@@ -3233,7 +3233,7 @@ const de_InvokeCommand = async (output, context) => {
3233
3233
  LogResult: [, output.headers["x-amz-log-result"]],
3234
3234
  ExecutedVersion: [, output.headers["x-amz-executed-version"]],
3235
3235
  });
3236
- const data = await collectBody(output.body, context);
3236
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
3237
3237
  contents.Payload = data;
3238
3238
  (0, smithy_client_1.map)(contents, {
3239
3239
  StatusCode: [, output.statusCode],
@@ -3302,6 +3302,9 @@ const de_InvokeCommandError = async (output, context) => {
3302
3302
  case "KMSNotFoundException":
3303
3303
  case "com.amazonaws.lambda#KMSNotFoundException":
3304
3304
  throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
3305
+ case "RecursiveInvocationException":
3306
+ case "com.amazonaws.lambda#RecursiveInvocationException":
3307
+ throw await de_RecursiveInvocationExceptionRes(parsedOutput, context);
3305
3308
  case "RequestTooLargeException":
3306
3309
  case "com.amazonaws.lambda#RequestTooLargeException":
3307
3310
  throw await de_RequestTooLargeExceptionRes(parsedOutput, context);
@@ -3354,7 +3357,7 @@ const de_InvokeAsyncCommand = async (output, context) => {
3354
3357
  (0, smithy_client_1.map)(contents, {
3355
3358
  Status: [, output.statusCode],
3356
3359
  });
3357
- await collectBody(output.body, context);
3360
+ await (0, smithy_client_1.collectBody)(output.body, context);
3358
3361
  return contents;
3359
3362
  };
3360
3363
  exports.de_InvokeAsyncCommand = de_InvokeAsyncCommand;
@@ -3467,6 +3470,9 @@ const de_InvokeWithResponseStreamCommandError = async (output, context) => {
3467
3470
  case "KMSNotFoundException":
3468
3471
  case "com.amazonaws.lambda#KMSNotFoundException":
3469
3472
  throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
3473
+ case "RecursiveInvocationException":
3474
+ case "com.amazonaws.lambda#RecursiveInvocationException":
3475
+ throw await de_RecursiveInvocationExceptionRes(parsedOutput, context);
3470
3476
  case "RequestTooLargeException":
3471
3477
  case "com.amazonaws.lambda#RequestTooLargeException":
3472
3478
  throw await de_RequestTooLargeExceptionRes(parsedOutput, context);
@@ -4413,7 +4419,7 @@ const de_RemoveLayerVersionPermissionCommand = async (output, context) => {
4413
4419
  const contents = (0, smithy_client_1.map)({
4414
4420
  $metadata: deserializeMetadata(output),
4415
4421
  });
4416
- await collectBody(output.body, context);
4422
+ await (0, smithy_client_1.collectBody)(output.body, context);
4417
4423
  return contents;
4418
4424
  };
4419
4425
  exports.de_RemoveLayerVersionPermissionCommand = de_RemoveLayerVersionPermissionCommand;
@@ -4455,7 +4461,7 @@ const de_RemovePermissionCommand = async (output, context) => {
4455
4461
  const contents = (0, smithy_client_1.map)({
4456
4462
  $metadata: deserializeMetadata(output),
4457
4463
  });
4458
- await collectBody(output.body, context);
4464
+ await (0, smithy_client_1.collectBody)(output.body, context);
4459
4465
  return contents;
4460
4466
  };
4461
4467
  exports.de_RemovePermissionCommand = de_RemovePermissionCommand;
@@ -4497,7 +4503,7 @@ const de_TagResourceCommand = async (output, context) => {
4497
4503
  const contents = (0, smithy_client_1.map)({
4498
4504
  $metadata: deserializeMetadata(output),
4499
4505
  });
4500
- await collectBody(output.body, context);
4506
+ await (0, smithy_client_1.collectBody)(output.body, context);
4501
4507
  return contents;
4502
4508
  };
4503
4509
  exports.de_TagResourceCommand = de_TagResourceCommand;
@@ -4539,7 +4545,7 @@ const de_UntagResourceCommand = async (output, context) => {
4539
4545
  const contents = (0, smithy_client_1.map)({
4540
4546
  $metadata: deserializeMetadata(output),
4541
4547
  });
4542
- await collectBody(output.body, context);
4548
+ await (0, smithy_client_1.collectBody)(output.body, context);
4543
4549
  return contents;
4544
4550
  };
4545
4551
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
@@ -5384,6 +5390,20 @@ const de_ProvisionedConcurrencyConfigNotFoundExceptionRes = async (parsedOutput,
5384
5390
  });
5385
5391
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
5386
5392
  };
5393
+ const de_RecursiveInvocationExceptionRes = async (parsedOutput, context) => {
5394
+ const contents = (0, smithy_client_1.map)({});
5395
+ const data = parsedOutput.body;
5396
+ const doc = (0, smithy_client_1.take)(data, {
5397
+ Message: smithy_client_1.expectString,
5398
+ Type: smithy_client_1.expectString,
5399
+ });
5400
+ Object.assign(contents, doc);
5401
+ const exception = new models_0_1.RecursiveInvocationException({
5402
+ $metadata: deserializeMetadata(parsedOutput),
5403
+ ...contents,
5404
+ });
5405
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
5406
+ };
5387
5407
  const de_RequestTooLargeExceptionRes = async (parsedOutput, context) => {
5388
5408
  const contents = (0, smithy_client_1.map)({});
5389
5409
  const data = parsedOutput.body;
@@ -5706,13 +5726,7 @@ const deserializeMetadata = (output) => ({
5706
5726
  extendedRequestId: output.headers["x-amz-id-2"],
5707
5727
  cfId: output.headers["x-amz-cf-id"],
5708
5728
  });
5709
- const collectBody = (streamBody = new Uint8Array(), context) => {
5710
- if (streamBody instanceof Uint8Array) {
5711
- return Promise.resolve(streamBody);
5712
- }
5713
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
5714
- };
5715
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
5729
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
5716
5730
  const isSerializableHeaderValue = (value) => value !== undefined &&
5717
5731
  value !== null &&
5718
5732
  value !== "" &&
@@ -592,6 +592,20 @@ export class KMSNotFoundException extends __BaseException {
592
592
  this.Message = opts.Message;
593
593
  }
594
594
  }
595
+ export class RecursiveInvocationException extends __BaseException {
596
+ constructor(opts) {
597
+ super({
598
+ name: "RecursiveInvocationException",
599
+ $fault: "client",
600
+ ...opts,
601
+ });
602
+ this.name = "RecursiveInvocationException";
603
+ this.$fault = "client";
604
+ Object.setPrototypeOf(this, RecursiveInvocationException.prototype);
605
+ this.Type = opts.Type;
606
+ this.Message = opts.Message;
607
+ }
608
+ }
595
609
  export class RequestTooLargeException extends __BaseException {
596
610
  constructor(opts) {
597
611
  super({
@@ -1,7 +1,7 @@
1
- import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { LambdaServiceException as __BaseException } from "../models/LambdaServiceException";
4
- import { CodeSigningConfigNotFoundException, CodeStorageExceededException, CodeVerificationFailedException, EC2AccessDeniedException, EC2ThrottledException, EC2UnexpectedException, EFSIOException, EFSMountConnectivityException, EFSMountFailureException, EFSMountTimeoutException, ENILimitReachedException, InvalidCodeSignatureException, InvalidParameterValueException, InvalidRequestContentException, InvalidRuntimeException, InvalidSecurityGroupIDException, InvalidSubnetIDException, InvalidZipFileException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, PolicyLengthExceededException, PreconditionFailedException, ProvisionedConcurrencyConfigNotFoundException, RequestTooLargeException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceException, SnapStartException, SnapStartNotReadyException, SnapStartTimeoutException, SubnetIPAddressLimitReachedException, TooManyRequestsException, UnsupportedMediaTypeException, } from "../models/models_0";
4
+ import { CodeSigningConfigNotFoundException, CodeStorageExceededException, CodeVerificationFailedException, EC2AccessDeniedException, EC2ThrottledException, EC2UnexpectedException, EFSIOException, EFSMountConnectivityException, EFSMountFailureException, EFSMountTimeoutException, ENILimitReachedException, InvalidCodeSignatureException, InvalidParameterValueException, InvalidRequestContentException, InvalidRuntimeException, InvalidSecurityGroupIDException, InvalidSubnetIDException, InvalidZipFileException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, PolicyLengthExceededException, PreconditionFailedException, ProvisionedConcurrencyConfigNotFoundException, RecursiveInvocationException, RequestTooLargeException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceException, SnapStartException, SnapStartNotReadyException, SnapStartTimeoutException, SubnetIPAddressLimitReachedException, TooManyRequestsException, UnsupportedMediaTypeException, } from "../models/models_0";
5
5
  export const se_AddLayerVersionPermissionCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -3197,6 +3197,9 @@ const de_InvokeCommandError = async (output, context) => {
3197
3197
  case "KMSNotFoundException":
3198
3198
  case "com.amazonaws.lambda#KMSNotFoundException":
3199
3199
  throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
3200
+ case "RecursiveInvocationException":
3201
+ case "com.amazonaws.lambda#RecursiveInvocationException":
3202
+ throw await de_RecursiveInvocationExceptionRes(parsedOutput, context);
3200
3203
  case "RequestTooLargeException":
3201
3204
  case "com.amazonaws.lambda#RequestTooLargeException":
3202
3205
  throw await de_RequestTooLargeExceptionRes(parsedOutput, context);
@@ -3360,6 +3363,9 @@ const de_InvokeWithResponseStreamCommandError = async (output, context) => {
3360
3363
  case "KMSNotFoundException":
3361
3364
  case "com.amazonaws.lambda#KMSNotFoundException":
3362
3365
  throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
3366
+ case "RecursiveInvocationException":
3367
+ case "com.amazonaws.lambda#RecursiveInvocationException":
3368
+ throw await de_RecursiveInvocationExceptionRes(parsedOutput, context);
3363
3369
  case "RequestTooLargeException":
3364
3370
  case "com.amazonaws.lambda#RequestTooLargeException":
3365
3371
  throw await de_RequestTooLargeExceptionRes(parsedOutput, context);
@@ -5247,6 +5253,20 @@ const de_ProvisionedConcurrencyConfigNotFoundExceptionRes = async (parsedOutput,
5247
5253
  });
5248
5254
  return __decorateServiceException(exception, parsedOutput.body);
5249
5255
  };
5256
+ const de_RecursiveInvocationExceptionRes = async (parsedOutput, context) => {
5257
+ const contents = map({});
5258
+ const data = parsedOutput.body;
5259
+ const doc = take(data, {
5260
+ Message: __expectString,
5261
+ Type: __expectString,
5262
+ });
5263
+ Object.assign(contents, doc);
5264
+ const exception = new RecursiveInvocationException({
5265
+ $metadata: deserializeMetadata(parsedOutput),
5266
+ ...contents,
5267
+ });
5268
+ return __decorateServiceException(exception, parsedOutput.body);
5269
+ };
5250
5270
  const de_RequestTooLargeExceptionRes = async (parsedOutput, context) => {
5251
5271
  const contents = map({});
5252
5272
  const data = parsedOutput.body;
@@ -5569,12 +5589,6 @@ const deserializeMetadata = (output) => ({
5569
5589
  extendedRequestId: output.headers["x-amz-id-2"],
5570
5590
  cfId: output.headers["x-amz-cf-id"],
5571
5591
  });
5572
- const collectBody = (streamBody = new Uint8Array(), context) => {
5573
- if (streamBody instanceof Uint8Array) {
5574
- return Promise.resolve(streamBody);
5575
- }
5576
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
5577
- };
5578
5592
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
5579
5593
  const isSerializableHeaderValue = (value) => value !== undefined &&
5580
5594
  value !== null &&
@@ -140,7 +140,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
140
140
  */
141
141
  runtime?: string;
142
142
  /**
143
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
143
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
144
144
  * trait of an operation.
145
145
  */
146
146
  disableHostPrefix?: boolean;
@@ -8,11 +8,6 @@ import { InvokeAsyncRequest, InvokeAsyncResponse } from "../models/models_0";
8
8
  * @public
9
9
  */
10
10
  export { __MetadataBearer, $Command };
11
- /**
12
- * @public
13
- *
14
- * The input for {@link InvokeAsyncCommand}.
15
- */
16
11
  export type InvokeAsyncCommandInputType = Omit<InvokeAsyncRequest, "InvokeArgs"> & {
17
12
  /**
18
13
  * For *`InvokeAsyncRequest["InvokeArgs"]`*, see {@link InvokeAsyncRequest.InvokeArgs}.
@@ -20,7 +15,9 @@ export type InvokeAsyncCommandInputType = Omit<InvokeAsyncRequest, "InvokeArgs">
20
15
  InvokeArgs: InvokeAsyncRequest["InvokeArgs"] | string | Uint8Array | Buffer;
21
16
  };
22
17
  /**
23
- * This interface extends from `InvokeAsyncRequest` interface. There are more parameters than `InvokeArgs` defined in {@link InvokeAsyncRequest}
18
+ * @public
19
+ *
20
+ * The input for {@link InvokeAsyncCommand}.
24
21
  */
25
22
  export interface InvokeAsyncCommandInput extends InvokeAsyncCommandInputType {
26
23
  }
@@ -1,25 +1,38 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { BlobTypes, Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
4
5
  import { LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LambdaClient";
5
6
  import { InvocationRequest, InvocationResponse } from "../models/models_0";
6
7
  /**
7
8
  * @public
8
9
  */
9
10
  export { __MetadataBearer, $Command };
11
+ /**
12
+ * @public
13
+ */
14
+ export type InvokeCommandInputType = Omit<InvocationRequest, "Payload"> & {
15
+ Payload?: BlobTypes;
16
+ };
10
17
  /**
11
18
  * @public
12
19
  *
13
20
  * The input for {@link InvokeCommand}.
14
21
  */
15
- export interface InvokeCommandInput extends InvocationRequest {
22
+ export interface InvokeCommandInput extends InvokeCommandInputType {
16
23
  }
24
+ /**
25
+ * @public
26
+ */
27
+ export type InvokeCommandOutputType = Omit<InvocationResponse, "Payload"> & {
28
+ Payload?: Uint8ArrayBlobAdapter;
29
+ };
17
30
  /**
18
31
  * @public
19
32
  *
20
33
  * The output of {@link InvokeCommand}.
21
34
  */
22
- export interface InvokeCommandOutput extends InvocationResponse, __MetadataBearer {
35
+ export interface InvokeCommandOutput extends InvokeCommandOutputType, __MetadataBearer {
23
36
  }
24
37
  /**
25
38
  * @public
@@ -143,6 +156,9 @@ export interface InvokeCommandOutput extends InvocationResponse, __MetadataBeare
143
156
  * <p>Lambda couldn't decrypt the environment variables because the KMS key was not
144
157
  * found. Check the function's KMS key settings.</p>
145
158
  *
159
+ * @throws {@link RecursiveInvocationException} (client fault)
160
+ * <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
161
+ *
146
162
  * @throws {@link RequestTooLargeException} (client fault)
147
163
  * <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda
148
164
  * quotas</a>.</p>
@@ -1,18 +1,24 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { BlobTypes, Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LambdaClient";
5
5
  import { InvokeWithResponseStreamRequest, InvokeWithResponseStreamResponse } from "../models/models_0";
6
6
  /**
7
7
  * @public
8
8
  */
9
9
  export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ */
13
+ export type InvokeWithResponseStreamCommandInputType = Omit<InvokeWithResponseStreamRequest, "Payload"> & {
14
+ Payload?: BlobTypes;
15
+ };
10
16
  /**
11
17
  * @public
12
18
  *
13
19
  * The input for {@link InvokeWithResponseStreamCommand}.
14
20
  */
15
- export interface InvokeWithResponseStreamCommandInput extends InvokeWithResponseStreamRequest {
21
+ export interface InvokeWithResponseStreamCommandInput extends InvokeWithResponseStreamCommandInputType {
16
22
  }
17
23
  /**
18
24
  * @public
@@ -130,6 +136,9 @@ export interface InvokeWithResponseStreamCommandOutput extends InvokeWithRespons
130
136
  * <p>Lambda couldn't decrypt the environment variables because the KMS key was not
131
137
  * found. Check the function's KMS key settings.</p>
132
138
  *
139
+ * @throws {@link RecursiveInvocationException} (client fault)
140
+ * <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
141
+ *
133
142
  * @throws {@link RequestTooLargeException} (client fault)
134
143
  * <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda
135
144
  * quotas</a>.</p>
@@ -3464,6 +3464,26 @@ export declare class KMSNotFoundException extends __BaseException {
3464
3464
  */
3465
3465
  constructor(opts: __ExceptionOptionType<KMSNotFoundException, __BaseException>);
3466
3466
  }
3467
+ /**
3468
+ * @public
3469
+ * <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
3470
+ */
3471
+ export declare class RecursiveInvocationException extends __BaseException {
3472
+ readonly name: "RecursiveInvocationException";
3473
+ readonly $fault: "client";
3474
+ /**
3475
+ * <p>The exception type.</p>
3476
+ */
3477
+ Type?: string;
3478
+ /**
3479
+ * <p>The exception message.</p>
3480
+ */
3481
+ Message?: string;
3482
+ /**
3483
+ * @internal
3484
+ */
3485
+ constructor(opts: __ExceptionOptionType<RecursiveInvocationException, __BaseException>);
3486
+ }
3467
3487
  /**
3468
3488
  * @public
3469
3489
  * <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda
@@ -1,11 +1,13 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import {
4
+ BlobTypes,
4
5
  Handler,
5
6
  HttpHandlerOptions as __HttpHandlerOptions,
6
7
  MetadataBearer as __MetadataBearer,
7
8
  MiddlewareStack,
8
9
  } from "@aws-sdk/types";
10
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
9
11
  import {
10
12
  LambdaClientResolvedConfig,
11
13
  ServiceInputTypes,
@@ -13,9 +15,21 @@ import {
13
15
  } from "../LambdaClient";
14
16
  import { InvocationRequest, InvocationResponse } from "../models/models_0";
15
17
  export { __MetadataBearer, $Command };
16
- export interface InvokeCommandInput extends InvocationRequest {}
18
+ export type InvokeCommandInputType = Pick<
19
+ InvocationRequest,
20
+ Exclude<keyof InvocationRequest, "Payload">
21
+ > & {
22
+ Payload?: BlobTypes;
23
+ };
24
+ export interface InvokeCommandInput extends InvokeCommandInputType {}
25
+ export type InvokeCommandOutputType = Pick<
26
+ InvocationResponse,
27
+ Exclude<keyof InvocationResponse, "Payload">
28
+ > & {
29
+ Payload?: Uint8ArrayBlobAdapter;
30
+ };
17
31
  export interface InvokeCommandOutput
18
- extends InvocationResponse,
32
+ extends InvokeCommandOutputType,
19
33
  __MetadataBearer {}
20
34
  export declare class InvokeCommand extends $Command<
21
35
  InvokeCommandInput,
@@ -1,6 +1,7 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import {
4
+ BlobTypes,
4
5
  Handler,
5
6
  HttpHandlerOptions as __HttpHandlerOptions,
6
7
  MetadataBearer as __MetadataBearer,
@@ -16,8 +17,14 @@ import {
16
17
  InvokeWithResponseStreamResponse,
17
18
  } from "../models/models_0";
18
19
  export { __MetadataBearer, $Command };
20
+ export type InvokeWithResponseStreamCommandInputType = Pick<
21
+ InvokeWithResponseStreamRequest,
22
+ Exclude<keyof InvokeWithResponseStreamRequest, "Payload">
23
+ > & {
24
+ Payload?: BlobTypes;
25
+ };
19
26
  export interface InvokeWithResponseStreamCommandInput
20
- extends InvokeWithResponseStreamRequest {}
27
+ extends InvokeWithResponseStreamCommandInputType {}
21
28
  export interface InvokeWithResponseStreamCommandOutput
22
29
  extends InvokeWithResponseStreamResponse,
23
30
  __MetadataBearer {}
@@ -1013,6 +1013,15 @@ export declare class KMSNotFoundException extends __BaseException {
1013
1013
  opts: __ExceptionOptionType<KMSNotFoundException, __BaseException>
1014
1014
  );
1015
1015
  }
1016
+ export declare class RecursiveInvocationException extends __BaseException {
1017
+ readonly name: "RecursiveInvocationException";
1018
+ readonly $fault: "client";
1019
+ Type?: string;
1020
+ Message?: string;
1021
+ constructor(
1022
+ opts: __ExceptionOptionType<RecursiveInvocationException, __BaseException>
1023
+ );
1024
+ }
1016
1025
  export declare class RequestTooLargeException extends __BaseException {
1017
1026
  readonly name: "RequestTooLargeException";
1018
1027
  readonly $fault: "client";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-lambda",
3
3
  "description": "AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native",
4
- "version": "3.354.0",
4
+ "version": "3.357.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,41 +21,42 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.354.0",
25
- "@aws-sdk/config-resolver": "3.354.0",
26
- "@aws-sdk/credential-provider-node": "3.354.0",
27
- "@aws-sdk/eventstream-serde-browser": "3.347.0",
28
- "@aws-sdk/eventstream-serde-config-resolver": "3.347.0",
29
- "@aws-sdk/eventstream-serde-node": "3.347.0",
30
- "@aws-sdk/fetch-http-handler": "3.353.0",
31
- "@aws-sdk/hash-node": "3.347.0",
32
- "@aws-sdk/invalid-dependency": "3.347.0",
33
- "@aws-sdk/middleware-content-length": "3.347.0",
34
- "@aws-sdk/middleware-endpoint": "3.347.0",
35
- "@aws-sdk/middleware-host-header": "3.347.0",
36
- "@aws-sdk/middleware-logger": "3.347.0",
37
- "@aws-sdk/middleware-recursion-detection": "3.347.0",
38
- "@aws-sdk/middleware-retry": "3.354.0",
39
- "@aws-sdk/middleware-serde": "3.347.0",
40
- "@aws-sdk/middleware-signing": "3.354.0",
41
- "@aws-sdk/middleware-stack": "3.347.0",
42
- "@aws-sdk/middleware-user-agent": "3.352.0",
43
- "@aws-sdk/node-config-provider": "3.354.0",
44
- "@aws-sdk/node-http-handler": "3.350.0",
45
- "@aws-sdk/smithy-client": "3.347.0",
46
- "@aws-sdk/types": "3.347.0",
47
- "@aws-sdk/url-parser": "3.347.0",
24
+ "@aws-sdk/client-sts": "3.357.0",
25
+ "@aws-sdk/config-resolver": "3.357.0",
26
+ "@aws-sdk/credential-provider-node": "3.357.0",
27
+ "@aws-sdk/eventstream-serde-browser": "3.357.0",
28
+ "@aws-sdk/eventstream-serde-config-resolver": "3.357.0",
29
+ "@aws-sdk/eventstream-serde-node": "3.357.0",
30
+ "@aws-sdk/fetch-http-handler": "3.357.0",
31
+ "@aws-sdk/hash-node": "3.357.0",
32
+ "@aws-sdk/invalid-dependency": "3.357.0",
33
+ "@aws-sdk/middleware-content-length": "3.357.0",
34
+ "@aws-sdk/middleware-endpoint": "3.357.0",
35
+ "@aws-sdk/middleware-host-header": "3.357.0",
36
+ "@aws-sdk/middleware-logger": "3.357.0",
37
+ "@aws-sdk/middleware-recursion-detection": "3.357.0",
38
+ "@aws-sdk/middleware-retry": "3.357.0",
39
+ "@aws-sdk/middleware-serde": "3.357.0",
40
+ "@aws-sdk/middleware-signing": "3.357.0",
41
+ "@aws-sdk/middleware-stack": "3.357.0",
42
+ "@aws-sdk/middleware-user-agent": "3.357.0",
43
+ "@aws-sdk/node-config-provider": "3.357.0",
44
+ "@aws-sdk/node-http-handler": "3.357.0",
45
+ "@aws-sdk/smithy-client": "3.357.0",
46
+ "@aws-sdk/types": "3.357.0",
47
+ "@aws-sdk/url-parser": "3.357.0",
48
48
  "@aws-sdk/util-base64": "3.310.0",
49
49
  "@aws-sdk/util-body-length-browser": "3.310.0",
50
50
  "@aws-sdk/util-body-length-node": "3.310.0",
51
- "@aws-sdk/util-defaults-mode-browser": "3.353.0",
52
- "@aws-sdk/util-defaults-mode-node": "3.354.0",
53
- "@aws-sdk/util-endpoints": "3.352.0",
54
- "@aws-sdk/util-retry": "3.347.0",
55
- "@aws-sdk/util-user-agent-browser": "3.347.0",
56
- "@aws-sdk/util-user-agent-node": "3.354.0",
51
+ "@aws-sdk/util-defaults-mode-browser": "3.357.0",
52
+ "@aws-sdk/util-defaults-mode-node": "3.357.0",
53
+ "@aws-sdk/util-endpoints": "3.357.0",
54
+ "@aws-sdk/util-retry": "3.357.0",
55
+ "@aws-sdk/util-stream": "3.357.0",
56
+ "@aws-sdk/util-user-agent-browser": "3.357.0",
57
+ "@aws-sdk/util-user-agent-node": "3.357.0",
57
58
  "@aws-sdk/util-utf8": "3.310.0",
58
- "@aws-sdk/util-waiter": "3.347.0",
59
+ "@aws-sdk/util-waiter": "3.357.0",
59
60
  "@smithy/protocol-http": "^1.0.1",
60
61
  "@smithy/types": "^1.0.0",
61
62
  "tslib": "^2.5.0"