@aws-sdk/client-lambda 3.218.0 → 3.219.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 (29) hide show
  1. package/dist-cjs/endpoint/ruleset.js +1 -1
  2. package/dist-cjs/models/models_0.js +90 -4
  3. package/dist-cjs/protocols/Aws_restJson1.js +83 -0
  4. package/dist-cjs/waiters/index.js +1 -0
  5. package/dist-cjs/waiters/waitForPublishedVersionActive.js +54 -0
  6. package/dist-es/endpoint/ruleset.js +1 -1
  7. package/dist-es/models/models_0.js +81 -0
  8. package/dist-es/protocols/Aws_restJson1.js +84 -1
  9. package/dist-es/waiters/index.js +1 -0
  10. package/dist-es/waiters/waitForPublishedVersionActive.js +49 -0
  11. package/dist-types/Lambda.d.ts +77 -80
  12. package/dist-types/commands/AddPermissionCommand.d.ts +13 -13
  13. package/dist-types/commands/CreateFunctionCommand.d.ts +26 -27
  14. package/dist-types/commands/DeleteFunctionCommand.d.ts +2 -3
  15. package/dist-types/commands/InvokeCommand.d.ts +10 -8
  16. package/dist-types/commands/ListFunctionsCommand.d.ts +4 -4
  17. package/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
  18. package/dist-types/commands/RemovePermissionCommand.d.ts +2 -2
  19. package/dist-types/commands/UpdateFunctionCodeCommand.d.ts +12 -15
  20. package/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +7 -7
  21. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  22. package/dist-types/models/models_0.d.ts +339 -209
  23. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  24. package/dist-types/ts3.4/models/models_0.d.ts +70 -0
  25. package/dist-types/ts3.4/waiters/index.d.ts +1 -0
  26. package/dist-types/ts3.4/waiters/waitForPublishedVersionActive.d.ts +11 -0
  27. package/dist-types/waiters/index.d.ts +1 -0
  28. package/dist-types/waiters/waitForPublishedVersionActive.d.ts +14 -0
  29. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { 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 as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
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, 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, RequestTooLargeException, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceException, SnapStartException, SnapStartNotReadyException, SnapStartTimeoutException, SubnetIPAddressLimitReachedException, TooManyRequestsException, UnsupportedMediaTypeException, } from "../models/models_0";
5
5
  export const serializeAws_restJson1AddLayerVersionPermissionCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -211,6 +211,7 @@ export const serializeAws_restJson1CreateFunctionCommand = async (input, context
211
211
  ...(input.Publish != null && { Publish: input.Publish }),
212
212
  ...(input.Role != null && { Role: input.Role }),
213
213
  ...(input.Runtime != null && { Runtime: input.Runtime }),
214
+ ...(input.SnapStart != null && { SnapStart: serializeAws_restJson1SnapStart(input.SnapStart, context) }),
214
215
  ...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
215
216
  ...(input.Timeout != null && { Timeout: input.Timeout }),
216
217
  ...(input.TracingConfig != null && {
@@ -1437,6 +1438,7 @@ export const serializeAws_restJson1UpdateFunctionConfigurationCommand = async (i
1437
1438
  ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
1438
1439
  ...(input.Role != null && { Role: input.Role }),
1439
1440
  ...(input.Runtime != null && { Runtime: input.Runtime }),
1441
+ ...(input.SnapStart != null && { SnapStart: serializeAws_restJson1SnapStart(input.SnapStart, context) }),
1440
1442
  ...(input.Timeout != null && { Timeout: input.Timeout }),
1441
1443
  ...(input.TracingConfig != null && {
1442
1444
  TracingConfig: serializeAws_restJson1TracingConfig(input.TracingConfig, context),
@@ -1913,6 +1915,9 @@ export const deserializeAws_restJson1CreateFunctionCommand = async (output, cont
1913
1915
  if (data.SigningProfileVersionArn != null) {
1914
1916
  contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn);
1915
1917
  }
1918
+ if (data.SnapStart != null) {
1919
+ contents.SnapStart = deserializeAws_restJson1SnapStartResponse(data.SnapStart, context);
1920
+ }
1916
1921
  if (data.State != null) {
1917
1922
  contents.State = __expectString(data.State);
1918
1923
  }
@@ -2990,6 +2995,9 @@ export const deserializeAws_restJson1GetFunctionConfigurationCommand = async (ou
2990
2995
  if (data.SigningProfileVersionArn != null) {
2991
2996
  contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn);
2992
2997
  }
2998
+ if (data.SnapStart != null) {
2999
+ contents.SnapStart = deserializeAws_restJson1SnapStartResponse(data.SnapStart, context);
3000
+ }
2993
3001
  if (data.State != null) {
2994
3002
  contents.State = __expectString(data.State);
2995
3003
  }
@@ -3528,6 +3536,15 @@ const deserializeAws_restJson1InvokeCommandError = async (output, context) => {
3528
3536
  case "ServiceException":
3529
3537
  case "com.amazonaws.lambda#ServiceException":
3530
3538
  throw await deserializeAws_restJson1ServiceExceptionResponse(parsedOutput, context);
3539
+ case "SnapStartException":
3540
+ case "com.amazonaws.lambda#SnapStartException":
3541
+ throw await deserializeAws_restJson1SnapStartExceptionResponse(parsedOutput, context);
3542
+ case "SnapStartNotReadyException":
3543
+ case "com.amazonaws.lambda#SnapStartNotReadyException":
3544
+ throw await deserializeAws_restJson1SnapStartNotReadyExceptionResponse(parsedOutput, context);
3545
+ case "SnapStartTimeoutException":
3546
+ case "com.amazonaws.lambda#SnapStartTimeoutException":
3547
+ throw await deserializeAws_restJson1SnapStartTimeoutExceptionResponse(parsedOutput, context);
3531
3548
  case "SubnetIPAddressLimitReachedException":
3532
3549
  case "com.amazonaws.lambda#SubnetIPAddressLimitReachedException":
3533
3550
  throw await deserializeAws_restJson1SubnetIPAddressLimitReachedExceptionResponse(parsedOutput, context);
@@ -4269,6 +4286,9 @@ export const deserializeAws_restJson1PublishVersionCommand = async (output, cont
4269
4286
  if (data.SigningProfileVersionArn != null) {
4270
4287
  contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn);
4271
4288
  }
4289
+ if (data.SnapStart != null) {
4290
+ contents.SnapStart = deserializeAws_restJson1SnapStartResponse(data.SnapStart, context);
4291
+ }
4272
4292
  if (data.State != null) {
4273
4293
  contents.State = __expectString(data.State);
4274
4294
  }
@@ -5019,6 +5039,9 @@ export const deserializeAws_restJson1UpdateFunctionCodeCommand = async (output,
5019
5039
  if (data.SigningProfileVersionArn != null) {
5020
5040
  contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn);
5021
5041
  }
5042
+ if (data.SnapStart != null) {
5043
+ contents.SnapStart = deserializeAws_restJson1SnapStartResponse(data.SnapStart, context);
5044
+ }
5022
5045
  if (data.State != null) {
5023
5046
  contents.State = __expectString(data.State);
5024
5047
  }
@@ -5175,6 +5198,9 @@ export const deserializeAws_restJson1UpdateFunctionConfigurationCommand = async
5175
5198
  if (data.SigningProfileVersionArn != null) {
5176
5199
  contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn);
5177
5200
  }
5201
+ if (data.SnapStart != null) {
5202
+ contents.SnapStart = deserializeAws_restJson1SnapStartResponse(data.SnapStart, context);
5203
+ }
5178
5204
  if (data.State != null) {
5179
5205
  contents.State = __expectString(data.State);
5180
5206
  }
@@ -5828,6 +5854,51 @@ const deserializeAws_restJson1ServiceExceptionResponse = async (parsedOutput, co
5828
5854
  });
5829
5855
  return __decorateServiceException(exception, parsedOutput.body);
5830
5856
  };
5857
+ const deserializeAws_restJson1SnapStartExceptionResponse = async (parsedOutput, context) => {
5858
+ const contents = map({});
5859
+ const data = parsedOutput.body;
5860
+ if (data.Message != null) {
5861
+ contents.Message = __expectString(data.Message);
5862
+ }
5863
+ if (data.Type != null) {
5864
+ contents.Type = __expectString(data.Type);
5865
+ }
5866
+ const exception = new SnapStartException({
5867
+ $metadata: deserializeMetadata(parsedOutput),
5868
+ ...contents,
5869
+ });
5870
+ return __decorateServiceException(exception, parsedOutput.body);
5871
+ };
5872
+ const deserializeAws_restJson1SnapStartNotReadyExceptionResponse = async (parsedOutput, context) => {
5873
+ const contents = map({});
5874
+ const data = parsedOutput.body;
5875
+ if (data.Message != null) {
5876
+ contents.Message = __expectString(data.Message);
5877
+ }
5878
+ if (data.Type != null) {
5879
+ contents.Type = __expectString(data.Type);
5880
+ }
5881
+ const exception = new SnapStartNotReadyException({
5882
+ $metadata: deserializeMetadata(parsedOutput),
5883
+ ...contents,
5884
+ });
5885
+ return __decorateServiceException(exception, parsedOutput.body);
5886
+ };
5887
+ const deserializeAws_restJson1SnapStartTimeoutExceptionResponse = async (parsedOutput, context) => {
5888
+ const contents = map({});
5889
+ const data = parsedOutput.body;
5890
+ if (data.Message != null) {
5891
+ contents.Message = __expectString(data.Message);
5892
+ }
5893
+ if (data.Type != null) {
5894
+ contents.Type = __expectString(data.Type);
5895
+ }
5896
+ const exception = new SnapStartTimeoutException({
5897
+ $metadata: deserializeMetadata(parsedOutput),
5898
+ ...contents,
5899
+ });
5900
+ return __decorateServiceException(exception, parsedOutput.body);
5901
+ };
5831
5902
  const deserializeAws_restJson1SubnetIPAddressLimitReachedExceptionResponse = async (parsedOutput, context) => {
5832
5903
  const contents = map({});
5833
5904
  const data = parsedOutput.body;
@@ -6126,6 +6197,11 @@ const serializeAws_restJson1SigningProfileVersionArns = (input, context) => {
6126
6197
  return entry;
6127
6198
  });
6128
6199
  };
6200
+ const serializeAws_restJson1SnapStart = (input, context) => {
6201
+ return {
6202
+ ...(input.ApplyOn != null && { ApplyOn: input.ApplyOn }),
6203
+ };
6204
+ };
6129
6205
  const serializeAws_restJson1SourceAccessConfiguration = (input, context) => {
6130
6206
  return {
6131
6207
  ...(input.Type != null && { Type: input.Type }),
@@ -6558,6 +6634,7 @@ const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
6558
6634
  Runtime: __expectString(output.Runtime),
6559
6635
  SigningJobArn: __expectString(output.SigningJobArn),
6560
6636
  SigningProfileVersionArn: __expectString(output.SigningProfileVersionArn),
6637
+ SnapStart: output.SnapStart != null ? deserializeAws_restJson1SnapStartResponse(output.SnapStart, context) : undefined,
6561
6638
  State: __expectString(output.State),
6562
6639
  StateReason: __expectString(output.StateReason),
6563
6640
  StateReasonCode: __expectString(output.StateReasonCode),
@@ -6815,6 +6892,12 @@ const deserializeAws_restJson1SigningProfileVersionArns = (output, context) => {
6815
6892
  });
6816
6893
  return retVal;
6817
6894
  };
6895
+ const deserializeAws_restJson1SnapStartResponse = (output, context) => {
6896
+ return {
6897
+ ApplyOn: __expectString(output.ApplyOn),
6898
+ OptimizationStatus: __expectString(output.OptimizationStatus),
6899
+ };
6900
+ };
6818
6901
  const deserializeAws_restJson1SourceAccessConfiguration = (output, context) => {
6819
6902
  return {
6820
6903
  Type: __expectString(output.Type),
@@ -3,3 +3,4 @@ export * from "./waitForFunctionActiveV2";
3
3
  export * from "./waitForFunctionExists";
4
4
  export * from "./waitForFunctionUpdated";
5
5
  export * from "./waitForFunctionUpdatedV2";
6
+ export * from "./waitForPublishedVersionActive";
@@ -0,0 +1,49 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
2
+ import { GetFunctionConfigurationCommand, } from "../commands/GetFunctionConfigurationCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetFunctionConfigurationCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.State;
11
+ };
12
+ if (returnComparator() === "Active") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.State;
20
+ };
21
+ if (returnComparator() === "Failed") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.State;
29
+ };
30
+ if (returnComparator() === "Pending") {
31
+ return { state: WaiterState.RETRY, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ }
36
+ catch (exception) {
37
+ reason = exception;
38
+ }
39
+ return { state: WaiterState.RETRY, reason };
40
+ };
41
+ export const waitForPublishedVersionActive = async (params, input) => {
42
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
43
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
44
+ };
45
+ export const waitUntilPublishedVersionActive = async (params, input) => {
46
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
47
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
48
+ return checkExceptions(result);
49
+ };
@@ -144,21 +144,21 @@ export declare class Lambda extends LambdaClient {
144
144
  addLayerVersionPermission(args: AddLayerVersionPermissionCommandInput, cb: (err: any, data?: AddLayerVersionPermissionCommandOutput) => void): void;
145
145
  addLayerVersionPermission(args: AddLayerVersionPermissionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AddLayerVersionPermissionCommandOutput) => void): void;
146
146
  /**
147
- * <p>Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the
148
- * policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier,
149
- * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.
150
- * Note: Lambda does not support adding policies to version $LATEST.</p>
147
+ * <p>Grants an Amazon Web Service, Amazon Web Services account, or Amazon Web Services organization
148
+ * permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict
149
+ * access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name
150
+ * (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies
151
+ * to version $LATEST.</p>
151
152
  *
152
- * <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant permission to an
153
- * organization defined in Organizations, specify the organization ID as the <code>PrincipalOrgID</code>.
154
- * For Amazon Web Services services, the principal is a domain-style identifier defined by the service,
155
- * like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services services, you can also specify
156
- * the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without
157
- * specifying the source, other accounts could potentially configure resources in their account to invoke your
158
- * Lambda function.</p>
153
+ * <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant
154
+ * permission to an organization defined in Organizations, specify the organization ID as the
155
+ * <code>PrincipalOrgID</code>. For Amazon Web Services, the principal is a domain-style identifier that
156
+ * the service defines, such as <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services, you can also specify the ARN of the associated resource as the <code>SourceArn</code>. If
157
+ * you grant permission to a service principal without specifying the source, other accounts could potentially
158
+ * configure resources in their account to invoke your Lambda function.</p>
159
159
  *
160
- * <p>This action adds a statement to a resource-based permissions policy for the function. For more information
161
- * about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
160
+ * <p>This operation adds a statement to a resource-based permissions policy for the function. For more information
161
+ * about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Using resource-based policies for Lambda</a>.</p>
162
162
  */
163
163
  addPermission(args: AddPermissionCommandInput, options?: __HttpHandlerOptions): Promise<AddPermissionCommandOutput>;
164
164
  addPermission(args: AddPermissionCommandInput, cb: (err: any, data?: AddPermissionCommandOutput) => void): void;
@@ -293,27 +293,27 @@ export declare class Lambda extends LambdaClient {
293
293
  createEventSourceMapping(args: CreateEventSourceMappingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateEventSourceMappingCommandOutput) => void): void;
294
294
  /**
295
295
  * <p>Creates a Lambda function. To create a function, you need a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html">deployment package</a> and an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role">execution role</a>. The
296
- * deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services
297
- * services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.</p>
296
+ * deployment package is a .zip file archive or container image that contains your function code. The execution role
297
+ * grants the function permission to use Amazon Web Services, such as Amazon CloudWatch Logs for log
298
+ * streaming and X-Ray for request tracing.</p>
298
299
  *
299
- * <p>You set the package type to <code>Image</code> if the deployment package is a
300
- * <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a>. For a container image,
301
- * the code property must include the URI of a container image in the Amazon ECR registry.
302
- * You do not need to specify the handler and runtime properties. </p>
300
+ * <p>If the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container
301
+ * image</a>, then you set the package type to <code>Image</code>. For a container image, the code property
302
+ * must include the URI of a container image in the Amazon ECR registry. You do not need to specify the
303
+ * handler and runtime properties.</p>
303
304
  *
304
- * <p>You set the package type to <code>Zip</code> if the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file
305
- * archive</a>. For a .zip file archive, the code property specifies the location of the
306
- * .zip file. You must also specify the handler and runtime properties. The code in the
307
- * deployment package must be compatible with the target instruction set architecture of the
308
- * function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, the default value is
305
+ * <p>If the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file archive</a>, then
306
+ * you set the package type to <code>Zip</code>. For a .zip file archive, the code property specifies the location of
307
+ * the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must
308
+ * be compatible with the target instruction set architecture of the function (<code>x86-64</code> or
309
+ * <code>arm64</code>). If you do not specify the architecture, then the default value is
309
310
  * <code>x86-64</code>.</p>
310
311
  *
311
- * <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If
312
- * your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or
313
- * modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in
314
- * the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to invoke. For
315
- * more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function
316
- * States</a>.</p>
312
+ * <p>When you create a function, Lambda provisions an instance of the function and its supporting
313
+ * resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't
314
+ * invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code>
315
+ * fields in the response from <a>GetFunctionConfiguration</a> indicate when the function is ready to
316
+ * invoke. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Lambda function states</a>.</p>
317
317
  *
318
318
  * <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version
319
319
  * changes when you update your function's code and configuration. A published version is a snapshot of your function
@@ -326,19 +326,18 @@ export declare class Lambda extends LambdaClient {
326
326
  * to both the unpublished and published versions of the function, and include tags (<a>TagResource</a>)
327
327
  * and per-function concurrency limits (<a>PutFunctionConcurrency</a>).</p>
328
328
  *
329
- * <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function,
330
- * specify the ARN of a code-signing configuration. When a user
331
- * attempts to deploy a code package with <a>UpdateFunctionCode</a>, Lambda checks that the code
332
- * package has a valid signature from a trusted publisher. The code-signing configuration
333
- * includes set set of signing profiles, which define the trusted publishers for this function.</p>
329
+ * <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this
330
+ * function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with
331
+ * <a>UpdateFunctionCode</a>, Lambda checks that the code package has a valid signature from
332
+ * a trusted publisher. The code-signing configuration includes set of signing profiles, which define the trusted
333
+ * publishers for this function.</p>
334
334
  *
335
- * <p>If another account or an Amazon Web Services service invokes your function, use <a>AddPermission</a> to grant
336
- * permission by creating a resource-based IAM policy. You can grant permissions at the function level, on a version,
337
- * or on an alias.</p>
335
+ * <p>If another Amazon Web Services account or an Amazon Web Service invokes your function, use <a>AddPermission</a> to grant permission by creating a resource-based Identity and Access Management (IAM) policy. You can grant permissions at the function level, on a version, or on an alias.</p>
338
336
  *
339
337
  * <p>To invoke your function directly, use <a>Invoke</a>. To invoke your function in response to events
340
- * in other Amazon Web Services services, create an event source mapping (<a>CreateEventSourceMapping</a>), or configure a
341
- * function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Functions</a>.</p>
338
+ * in other Amazon Web Services, create an event source mapping (<a>CreateEventSourceMapping</a>),
339
+ * or configure a function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Lambda
340
+ * functions</a>.</p>
342
341
  */
343
342
  createFunction(args: CreateFunctionCommandInput, options?: __HttpHandlerOptions): Promise<CreateFunctionCommandOutput>;
344
343
  createFunction(args: CreateFunctionCommandInput, cb: (err: any, data?: CreateFunctionCommandOutput) => void): void;
@@ -376,9 +375,8 @@ export declare class Lambda extends LambdaClient {
376
375
  * <p>Deletes a Lambda function. To delete a specific function version, use the <code>Qualifier</code> parameter.
377
376
  * Otherwise, all versions and aliases are deleted.</p>
378
377
  *
379
- * <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>.
380
- * For Amazon Web Services services and resources that invoke your function directly, delete the trigger in the service where you
381
- * originally configured it.</p>
378
+ * <p>To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>. For Amazon Web Services and resources that invoke your function
379
+ * directly, delete the trigger in the service where you originally configured it.</p>
382
380
  */
383
381
  deleteFunction(args: DeleteFunctionCommandInput, options?: __HttpHandlerOptions): Promise<DeleteFunctionCommandOutput>;
384
382
  deleteFunction(args: DeleteFunctionCommandInput, cb: (err: any, data?: DeleteFunctionCommandOutput) => void): void;
@@ -535,21 +533,23 @@ export declare class Lambda extends LambdaClient {
535
533
  *
536
534
  * <p>When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type,
537
535
  * client, event source, and invocation type. For example, if you invoke a function asynchronously and it returns an
538
- * error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html">Retry Behavior</a>.</p>
536
+ * error, Lambda executes the function up to two more times. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html">Error handling and automatic retries in
537
+ * Lambda</a>.</p>
539
538
  *
540
539
  * <p>For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html">asynchronous invocation</a>,
541
540
  * Lambda adds events to a queue before sending them to your function. If your function does not have enough capacity
542
541
  * to keep up with the queue, events may be lost. Occasionally, your function may receive the same event multiple
543
- * times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq">dead-letter queue</a>.</p>
542
+ * times, even if no error occurs. To retain events that were not processed, configure your function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">dead-letter queue</a>.</p>
544
543
  *
545
544
  * <p>The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that
546
- * prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">limit errors</a>, or issues with your function's code and configuration.
547
- * For example, Lambda returns <code>TooManyRequestsException</code> if executing the function would cause you to
548
- * exceed a concurrency limit at either the account level (<code>ConcurrentInvocationLimitExceeded</code>) or
549
- * function level (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p>
545
+ * prevent your function from executing, such as permissions errors, <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">quota</a> errors, or issues with your function's code and
546
+ * configuration. For example, Lambda returns <code>TooManyRequestsException</code> if running the
547
+ * function would cause you to exceed a concurrency limit at either the account level
548
+ * (<code>ConcurrentInvocationLimitExceeded</code>) or function level
549
+ * (<code>ReservedFunctionConcurrentInvocationLimitExceeded</code>).</p>
550
550
  *
551
- * <p>For functions with a long timeout, your client might be disconnected during synchronous invocation while it
552
- * waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long
551
+ * <p>For functions with a long timeout, your client might disconnect during synchronous invocation while it waits
552
+ * for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long
553
553
  * connections with timeout or keep-alive settings.</p>
554
554
  *
555
555
  * <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action. For details on how to set up
@@ -603,11 +603,11 @@ export declare class Lambda extends LambdaClient {
603
603
  * <p>Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50
604
604
  * functions per call.</p>
605
605
  * <p>Set <code>FunctionVersion</code> to <code>ALL</code> to include all published versions of each function in
606
- * addition to the unpublished version. </p>
606
+ * addition to the unpublished version.</p>
607
607
  * <note>
608
- * <p>The <code>ListFunctions</code> action returns a subset of the <a>FunctionConfiguration</a> fields.
609
- * To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, LastUpdateStatusReasonCode)
610
- * for a function or version, use <a>GetFunction</a>.</p>
608
+ * <p>The <code>ListFunctions</code> operation returns a subset of the <a>FunctionConfiguration</a> fields.
609
+ * To get the additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason,
610
+ * LastUpdateStatusReasonCode) for a function or version, use <a>GetFunction</a>.</p>
611
611
  * </note>
612
612
  */
613
613
  listFunctions(args: ListFunctionsCommandInput, options?: __HttpHandlerOptions): Promise<ListFunctionsCommandOutput>;
@@ -705,7 +705,7 @@ export declare class Lambda extends LambdaClient {
705
705
  * the current setting for a function.</p>
706
706
  * <p>Use <a>GetAccountSettings</a> to see your Regional concurrency limit. You can reserve concurrency
707
707
  * for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for
708
- * functions that aren't configured with a per-function limit. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html">Managing Concurrency</a>.</p>
708
+ * functions that aren't configured with a per-function limit. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html">Lambda function scaling</a>.</p>
709
709
  */
710
710
  putFunctionConcurrency(args: PutFunctionConcurrencyCommandInput, options?: __HttpHandlerOptions): Promise<PutFunctionConcurrencyCommandOutput>;
711
711
  putFunctionConcurrency(args: PutFunctionConcurrencyCommandInput, cb: (err: any, data?: PutFunctionConcurrencyCommandOutput) => void): void;
@@ -741,8 +741,8 @@ export declare class Lambda extends LambdaClient {
741
741
  removeLayerVersionPermission(args: RemoveLayerVersionPermissionCommandInput, cb: (err: any, data?: RemoveLayerVersionPermissionCommandOutput) => void): void;
742
742
  removeLayerVersionPermission(args: RemoveLayerVersionPermissionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RemoveLayerVersionPermissionCommandOutput) => void): void;
743
743
  /**
744
- * <p>Revokes function-use permission from an Amazon Web Services service or another account. You can get the ID of the statement
745
- * from the output of <a>GetPolicy</a>.</p>
744
+ * <p>Revokes function-use permission from an Amazon Web Service or another Amazon Web Services account. You
745
+ * can get the ID of the statement from the output of <a>GetPolicy</a>.</p>
746
746
  */
747
747
  removePermission(args: RemovePermissionCommandInput, options?: __HttpHandlerOptions): Promise<RemovePermissionCommandOutput>;
748
748
  removePermission(args: RemovePermissionCommandInput, cb: (err: any, data?: RemovePermissionCommandOutput) => void): void;
@@ -882,27 +882,24 @@ export declare class Lambda extends LambdaClient {
882
882
  updateEventSourceMapping(args: UpdateEventSourceMappingCommandInput, cb: (err: any, data?: UpdateEventSourceMappingCommandOutput) => void): void;
883
883
  updateEventSourceMapping(args: UpdateEventSourceMappingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateEventSourceMappingCommandOutput) => void): void;
884
884
  /**
885
- * <p>Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed
886
- * by a trusted publisher. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-trustedcode.html">Configuring code signing</a>.</p>
885
+ * <p>Updates a Lambda function's code. If code signing is enabled for the function, the code package
886
+ * must be signed by a trusted publisher. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html">Configuring code signing for Lambda</a>.</p>
887
887
  *
888
- * <p>If the function's package type is <code>Image</code>, you must specify the code package in <code>ImageUri</code> as
889
- * the URI of a
890
- * <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a>
891
- * in the Amazon ECR registry.
892
- * </p>
888
+ * <p>If the function's package type is <code>Image</code>, then you must specify the code package in
889
+ * <code>ImageUri</code> as the URI of a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a> in the Amazon ECR registry.</p>
893
890
  *
894
- * <p>If the function's package type is <code>Zip</code>, you must specify the deployment
895
- * package as a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file
896
- * archive</a>. Enter the Amazon S3 bucket and key of the code .zip file location.
897
- * You can also provide the function code inline using the <code>ZipFile</code> field. </p>
898
- * <p>The code in the deployment package must be compatible with the target instruction set
899
- * architecture of the function (<code>x86-64</code> or <code>arm64</code>). </p>
891
+ * <p>If the function's package type is <code>Zip</code>, then you must specify the deployment package as a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file
892
+ * archive</a>. Enter the Amazon S3 bucket and key of the code .zip file location. You can also provide
893
+ * the function code inline using the <code>ZipFile</code> field.</p>
894
+ * <p>The code in the deployment package must be compatible with the target instruction set architecture of the
895
+ * function (<code>x86-64</code> or <code>arm64</code>).</p>
900
896
  *
901
897
  * <p>The function's code is locked when you publish a version. You can't modify the code of a published version,
902
898
  * only the unpublished version.</p>
903
899
  * <note>
904
- * <p>For a function defined as a container image, Lambda resolves the image tag to an image digest. In Amazon ECR, if
905
- * you update the image tag to a new image, Lambda does not automatically update the function.</p>
900
+ * <p>For a function defined as a container image, Lambda resolves the image tag to an image digest. In
901
+ * Amazon ECR, if you update the image tag to a new image, Lambda does not automatically
902
+ * update the function.</p>
906
903
  * </note>
907
904
  */
908
905
  updateFunctionCode(args: UpdateFunctionCodeCommandInput, options?: __HttpHandlerOptions): Promise<UpdateFunctionCodeCommandOutput>;
@@ -911,19 +908,19 @@ export declare class Lambda extends LambdaClient {
911
908
  /**
912
909
  * <p>Modify the version-specific settings of a Lambda function.</p>
913
910
  *
914
- * <p>When you update a function, Lambda provisions an instance of the function and its supporting resources. If
915
- * your function connects to a VPC, this process can take a minute. During this time, you can't modify the function,
916
- * but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>, and
917
- * <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a>
911
+ * <p>When you update a function, Lambda provisions an instance of the function and its supporting
912
+ * resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify
913
+ * the function, but you can still invoke it. The <code>LastUpdateStatus</code>, <code>LastUpdateStatusReason</code>,
914
+ * and <code>LastUpdateStatusReasonCode</code> fields in the response from <a>GetFunctionConfiguration</a>
918
915
  * indicate when the update is complete and the function is processing events with the new configuration. For more
919
- * information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Function
920
- * States</a>.</p>
916
+ * information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Lambda
917
+ * function states</a>.</p>
921
918
  *
922
919
  * <p>These settings can vary between versions of a function and are locked when you publish a version. You can't
923
920
  * modify the configuration of a published version, only the unpublished version.</p>
924
921
  *
925
922
  * <p>To configure function concurrency, use <a>PutFunctionConcurrency</a>. To grant invoke permissions
926
- * to an account or Amazon Web Services service, use <a>AddPermission</a>.</p>
923
+ * to an Amazon Web Services account or Amazon Web Service, use <a>AddPermission</a>.</p>
927
924
  */
928
925
  updateFunctionConfiguration(args: UpdateFunctionConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<UpdateFunctionConfigurationCommandOutput>;
929
926
  updateFunctionConfiguration(args: UpdateFunctionConfigurationCommandInput, cb: (err: any, data?: UpdateFunctionConfigurationCommandOutput) => void): void;
@@ -8,21 +8,21 @@ export interface AddPermissionCommandInput extends AddPermissionRequest {
8
8
  export interface AddPermissionCommandOutput extends AddPermissionResponse, __MetadataBearer {
9
9
  }
10
10
  /**
11
- * <p>Grants an Amazon Web Services service, account, or organization permission to use a function. You can apply the
12
- * policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier,
13
- * the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.
14
- * Note: Lambda does not support adding policies to version $LATEST.</p>
11
+ * <p>Grants an Amazon Web Service, Amazon Web Services account, or Amazon Web Services organization
12
+ * permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict
13
+ * access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name
14
+ * (ARN) of that version or alias to invoke the function. Note: Lambda does not support adding policies
15
+ * to version $LATEST.</p>
15
16
  *
16
- * <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant permission to an
17
- * organization defined in Organizations, specify the organization ID as the <code>PrincipalOrgID</code>.
18
- * For Amazon Web Services services, the principal is a domain-style identifier defined by the service,
19
- * like <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services services, you can also specify
20
- * the ARN of the associated resource as the <code>SourceArn</code>. If you grant permission to a service principal without
21
- * specifying the source, other accounts could potentially configure resources in their account to invoke your
22
- * Lambda function.</p>
17
+ * <p>To grant permission to another account, specify the account ID as the <code>Principal</code>. To grant
18
+ * permission to an organization defined in Organizations, specify the organization ID as the
19
+ * <code>PrincipalOrgID</code>. For Amazon Web Services, the principal is a domain-style identifier that
20
+ * the service defines, such as <code>s3.amazonaws.com</code> or <code>sns.amazonaws.com</code>. For Amazon Web Services, you can also specify the ARN of the associated resource as the <code>SourceArn</code>. If
21
+ * you grant permission to a service principal without specifying the source, other accounts could potentially
22
+ * configure resources in their account to invoke your Lambda function.</p>
23
23
  *
24
- * <p>This action adds a statement to a resource-based permissions policy for the function. For more information
25
- * about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Lambda Function Policies</a>. </p>
24
+ * <p>This operation adds a statement to a resource-based permissions policy for the function. For more information
25
+ * about function policies, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html">Using resource-based policies for Lambda</a>.</p>
26
26
  * @example
27
27
  * Use a bare-bones client and the command you need to make an API call.
28
28
  * ```javascript