@aws-sdk/client-lambda 3.655.0 → 3.656.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 (49) hide show
  1. package/dist-types/commands/AddLayerVersionPermissionCommand.d.ts +21 -0
  2. package/dist-types/commands/AddPermissionCommand.d.ts +40 -0
  3. package/dist-types/commands/CreateAliasCommand.d.ts +23 -0
  4. package/dist-types/commands/CreateEventSourceMappingCommand.d.ts +24 -0
  5. package/dist-types/commands/CreateFunctionCommand.d.ts +64 -0
  6. package/dist-types/commands/DeleteAliasCommand.d.ts +12 -0
  7. package/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +22 -0
  8. package/dist-types/commands/DeleteFunctionCommand.d.ts +12 -0
  9. package/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +11 -0
  10. package/dist-types/commands/DeleteFunctionEventInvokeConfigCommand.d.ts +12 -0
  11. package/dist-types/commands/DeleteLayerVersionCommand.d.ts +12 -0
  12. package/dist-types/commands/DeleteProvisionedConcurrencyConfigCommand.d.ts +12 -0
  13. package/dist-types/commands/GetAccountSettingsCommand.d.ts +24 -0
  14. package/dist-types/commands/GetAliasCommand.d.ts +21 -0
  15. package/dist-types/commands/GetEventSourceMappingCommand.d.ts +27 -0
  16. package/dist-types/commands/GetFunctionCommand.d.ts +50 -0
  17. package/dist-types/commands/GetFunctionConcurrencyCommand.d.ts +16 -0
  18. package/dist-types/commands/GetFunctionConfigurationCommand.d.ts +41 -0
  19. package/dist-types/commands/GetFunctionEventInvokeConfigCommand.d.ts +26 -0
  20. package/dist-types/commands/GetLayerVersionByArnCommand.d.ts +28 -0
  21. package/dist-types/commands/GetLayerVersionCommand.d.ts +31 -0
  22. package/dist-types/commands/GetPolicyCommand.d.ts +18 -0
  23. package/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +42 -0
  24. package/dist-types/commands/InvokeAsyncCommand.d.ts +17 -0
  25. package/dist-types/commands/InvokeCommand.d.ts +39 -0
  26. package/dist-types/commands/ListAliasesCommand.d.ts +36 -0
  27. package/dist-types/commands/ListEventSourceMappingsCommand.d.ts +26 -0
  28. package/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +29 -0
  29. package/dist-types/commands/ListFunctionsCommand.d.ts +57 -0
  30. package/dist-types/commands/ListLayerVersionsCommand.d.ts +35 -0
  31. package/dist-types/commands/ListLayersCommand.d.ts +31 -0
  32. package/dist-types/commands/ListProvisionedConcurrencyConfigsCommand.d.ts +33 -0
  33. package/dist-types/commands/ListTagsCommand.d.ts +19 -0
  34. package/dist-types/commands/ListVersionsByFunctionCommand.d.ts +67 -0
  35. package/dist-types/commands/PublishLayerVersionCommand.d.ts +40 -0
  36. package/dist-types/commands/PublishVersionCommand.d.ts +42 -0
  37. package/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +17 -0
  38. package/dist-types/commands/PutFunctionEventInvokeConfigCommand.d.ts +25 -0
  39. package/dist-types/commands/PutProvisionedConcurrencyConfigCommand.d.ts +21 -0
  40. package/dist-types/commands/RemoveLayerVersionPermissionCommand.d.ts +13 -0
  41. package/dist-types/commands/RemovePermissionCommand.d.ts +13 -0
  42. package/dist-types/commands/TagResourceCommand.d.ts +14 -0
  43. package/dist-types/commands/UntagResourceCommand.d.ts +14 -0
  44. package/dist-types/commands/UpdateAliasCommand.d.ts +32 -0
  45. package/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +26 -0
  46. package/dist-types/commands/UpdateFunctionCodeCommand.d.ts +33 -0
  47. package/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +32 -0
  48. package/dist-types/commands/UpdateFunctionEventInvokeConfigCommand.d.ts +30 -0
  49. package/package.json +1 -1
@@ -195,6 +195,48 @@ declare const PublishVersionCommand_base: {
195
195
  * <p>Base exception class for all service exceptions from Lambda service.</p>
196
196
  *
197
197
  * @public
198
+ * @example To publish a version of a Lambda function
199
+ * ```javascript
200
+ * // This operation publishes a version of a Lambda function
201
+ * const input = {
202
+ * "CodeSha256": "",
203
+ * "Description": "",
204
+ * "FunctionName": "myFunction"
205
+ * };
206
+ * const command = new PublishVersionCommand(input);
207
+ * const response = await client.send(command);
208
+ * /* response ==
209
+ * {
210
+ * "CodeSha256": "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
211
+ * "CodeSize": 5797206,
212
+ * "Description": "Process image objects from Amazon S3.",
213
+ * "Environment": {
214
+ * "Variables": {
215
+ * "BUCKET": "my-bucket-1xpuxmplzrlbh",
216
+ * "PREFIX": "inbound"
217
+ * }
218
+ * },
219
+ * "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:my-function",
220
+ * "FunctionName": "my-function",
221
+ * "Handler": "index.handler",
222
+ * "KMSKeyArn": "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
223
+ * "LastModified": "2020-04-10T19:06:32.563+0000",
224
+ * "LastUpdateStatus": "Successful",
225
+ * "MemorySize": 256,
226
+ * "RevisionId": "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
227
+ * "Role": "arn:aws:iam::123456789012:role/lambda-role",
228
+ * "Runtime": "nodejs12.x",
229
+ * "State": "Active",
230
+ * "Timeout": 5,
231
+ * "TracingConfig": {
232
+ * "Mode": "Active"
233
+ * },
234
+ * "Version": "1"
235
+ * }
236
+ * *\/
237
+ * // example id: to-publish-a-version-of-a-lambda-function-1481650704986
238
+ * ```
239
+ *
198
240
  */
199
241
  export declare class PublishVersionCommand extends PublishVersionCommand_base {
200
242
  /** @internal type navigation helper, not in runtime. */
@@ -79,6 +79,23 @@ declare const PutFunctionConcurrencyCommand_base: {
79
79
  * <p>Base exception class for all service exceptions from Lambda service.</p>
80
80
  *
81
81
  * @public
82
+ * @example To configure a reserved concurrency limit for a function
83
+ * ```javascript
84
+ * // The following example configures 100 reserved concurrent executions for the my-function function.
85
+ * const input = {
86
+ * "FunctionName": "my-function",
87
+ * "ReservedConcurrentExecutions": 100
88
+ * };
89
+ * const command = new PutFunctionConcurrencyCommand(input);
90
+ * const response = await client.send(command);
91
+ * /* response ==
92
+ * {
93
+ * "ReservedConcurrentExecutions": 100
94
+ * }
95
+ * *\/
96
+ * // example id: to-configure-a-reserved-concurrency-limit-for-a-function-1586491405956
97
+ * ```
98
+ *
82
99
  */
83
100
  export declare class PutFunctionConcurrencyCommand extends PutFunctionConcurrencyCommand_base {
84
101
  /** @internal type navigation helper, not in runtime. */
@@ -102,6 +102,31 @@ declare const PutFunctionEventInvokeConfigCommand_base: {
102
102
  * <p>Base exception class for all service exceptions from Lambda service.</p>
103
103
  *
104
104
  * @public
105
+ * @example To configure error handling for asynchronous invocation
106
+ * ```javascript
107
+ * // The following example sets a maximum event age of one hour and disables retries for the specified function.
108
+ * const input = {
109
+ * "FunctionName": "my-function",
110
+ * "MaximumEventAgeInSeconds": 3600,
111
+ * "MaximumRetryAttempts": 0
112
+ * };
113
+ * const command = new PutFunctionEventInvokeConfigCommand(input);
114
+ * const response = await client.send(command);
115
+ * /* response ==
116
+ * {
117
+ * "DestinationConfig": {
118
+ * "OnFailure": {},
119
+ * "OnSuccess": {}
120
+ * },
121
+ * "FunctionArn": "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
122
+ * "LastModified": "${timestamp}",
123
+ * "MaximumEventAgeInSeconds": 3600,
124
+ * "MaximumRetryAttempts": 0
125
+ * }
126
+ * *\/
127
+ * // example id: to-configure-error-handling-for-asynchronous-invocation-1586491524021
128
+ * ```
129
+ *
105
130
  */
106
131
  export declare class PutFunctionEventInvokeConfigCommand extends PutFunctionEventInvokeConfigCommand_base {
107
132
  /** @internal type navigation helper, not in runtime. */
@@ -77,6 +77,27 @@ declare const PutProvisionedConcurrencyConfigCommand_base: {
77
77
  * <p>Base exception class for all service exceptions from Lambda service.</p>
78
78
  *
79
79
  * @public
80
+ * @example To allocate provisioned concurrency
81
+ * ```javascript
82
+ * // The following example allocates 100 provisioned concurrency for the BLUE alias of the specified function.
83
+ * const input = {
84
+ * "FunctionName": "my-function",
85
+ * "ProvisionedConcurrentExecutions": 100,
86
+ * "Qualifier": "BLUE"
87
+ * };
88
+ * const command = new PutProvisionedConcurrencyConfigCommand(input);
89
+ * const response = await client.send(command);
90
+ * /* response ==
91
+ * {
92
+ * "AllocatedProvisionedConcurrentExecutions": 0,
93
+ * "LastModified": "2019-11-21T19:32:12+0000",
94
+ * "RequestedProvisionedConcurrentExecutions": 100,
95
+ * "Status": "IN_PROGRESS"
96
+ * }
97
+ * *\/
98
+ * // example id: to-allocate-provisioned-concurrency-1586491651377
99
+ * ```
100
+ *
80
101
  */
81
102
  export declare class PutProvisionedConcurrencyConfigCommand extends PutProvisionedConcurrencyConfigCommand_base {
82
103
  /** @internal type navigation helper, not in runtime. */
@@ -83,6 +83,19 @@ declare const RemoveLayerVersionPermissionCommand_base: {
83
83
  * <p>Base exception class for all service exceptions from Lambda service.</p>
84
84
  *
85
85
  * @public
86
+ * @example To delete layer-version permissions
87
+ * ```javascript
88
+ * // The following example deletes permission for an account to configure a layer version.
89
+ * const input = {
90
+ * "LayerName": "my-layer",
91
+ * "StatementId": "xaccount",
92
+ * "VersionNumber": 1
93
+ * };
94
+ * const command = new RemoveLayerVersionPermissionCommand(input);
95
+ * await client.send(command);
96
+ * // example id: to-delete-layer-version-permissions-1586491829416
97
+ * ```
98
+ *
86
99
  */
87
100
  export declare class RemoveLayerVersionPermissionCommand extends RemoveLayerVersionPermissionCommand_base {
88
101
  /** @internal type navigation helper, not in runtime. */
@@ -87,6 +87,19 @@ declare const RemovePermissionCommand_base: {
87
87
  * <p>Base exception class for all service exceptions from Lambda service.</p>
88
88
  *
89
89
  * @public
90
+ * @example To remove a Lambda function's permissions
91
+ * ```javascript
92
+ * // The following example removes a permissions statement named xaccount from the PROD alias of a function named my-function.
93
+ * const input = {
94
+ * "FunctionName": "my-function",
95
+ * "Qualifier": "PROD",
96
+ * "StatementId": "xaccount"
97
+ * };
98
+ * const command = new RemovePermissionCommand(input);
99
+ * await client.send(command);
100
+ * // example id: to-remove-a-lambda-functions-permissions-1481661337021
101
+ * ```
102
+ *
90
103
  */
91
104
  export declare class RemovePermissionCommand extends RemovePermissionCommand_base {
92
105
  /** @internal type navigation helper, not in runtime. */
@@ -71,6 +71,20 @@ declare const TagResourceCommand_base: {
71
71
  * <p>Base exception class for all service exceptions from Lambda service.</p>
72
72
  *
73
73
  * @public
74
+ * @example To add tags to an existing Lambda function
75
+ * ```javascript
76
+ * // The following example adds a tag with the key name DEPARTMENT and a value of 'Department A' to the specified Lambda function.
77
+ * const input = {
78
+ * "Resource": "arn:aws:lambda:us-west-2:123456789012:function:my-function",
79
+ * "Tags": {
80
+ * "DEPARTMENT": "Department A"
81
+ * }
82
+ * };
83
+ * const command = new TagResourceCommand(input);
84
+ * await client.send(command);
85
+ * // example id: to-add-tags-to-an-existing-lambda-function-1586491890446
86
+ * ```
87
+ *
74
88
  */
75
89
  export declare class TagResourceCommand extends TagResourceCommand_base {
76
90
  /** @internal type navigation helper, not in runtime. */
@@ -71,6 +71,20 @@ declare const UntagResourceCommand_base: {
71
71
  * <p>Base exception class for all service exceptions from Lambda service.</p>
72
72
  *
73
73
  * @public
74
+ * @example To remove tags from an existing Lambda function
75
+ * ```javascript
76
+ * // The following example removes the tag with the key name DEPARTMENT tag from the my-function Lambda function.
77
+ * const input = {
78
+ * "Resource": "arn:aws:lambda:us-west-2:123456789012:function:my-function",
79
+ * "TagKeys": [
80
+ * "DEPARTMENT"
81
+ * ]
82
+ * };
83
+ * const command = new UntagResourceCommand(input);
84
+ * await client.send(command);
85
+ * // example id: to-remove-tags-from-an-existing-lambda-function-1586491956425
86
+ * ```
87
+ *
74
88
  */
75
89
  export declare class UntagResourceCommand extends UntagResourceCommand_base {
76
90
  /** @internal type navigation helper, not in runtime. */
@@ -101,6 +101,38 @@ declare const UpdateAliasCommand_base: {
101
101
  * <p>Base exception class for all service exceptions from Lambda service.</p>
102
102
  *
103
103
  * @public
104
+ * @example To update a function alias
105
+ * ```javascript
106
+ * // The following example updates the alias named BLUE to send 30% of traffic to version 2 and 70% to version 1.
107
+ * const input = {
108
+ * "FunctionName": "my-function",
109
+ * "FunctionVersion": "2",
110
+ * "Name": "BLUE",
111
+ * "RoutingConfig": {
112
+ * "AdditionalVersionWeights": {
113
+ * "1": 0.7
114
+ * }
115
+ * }
116
+ * };
117
+ * const command = new UpdateAliasCommand(input);
118
+ * const response = await client.send(command);
119
+ * /* response ==
120
+ * {
121
+ * "AliasArn": "arn:aws:lambda:us-west-2:123456789012:function:my-function:BLUE",
122
+ * "Description": "Production environment BLUE.",
123
+ * "FunctionVersion": "2",
124
+ * "Name": "BLUE",
125
+ * "RevisionId": "594f41fb-xmpl-4c20-95c7-6ca5f2a92c93",
126
+ * "RoutingConfig": {
127
+ * "AdditionalVersionWeights": {
128
+ * "1": 0.7
129
+ * }
130
+ * }
131
+ * }
132
+ * *\/
133
+ * // example id: to-update-a-function-alias-1481650817950
134
+ * ```
135
+ *
104
136
  */
105
137
  export declare class UpdateAliasCommand extends UpdateAliasCommand_base {
106
138
  /** @internal type navigation helper, not in runtime. */
@@ -302,6 +302,32 @@ declare const UpdateEventSourceMappingCommand_base: {
302
302
  * <p>Base exception class for all service exceptions from Lambda service.</p>
303
303
  *
304
304
  * @public
305
+ * @example To update a Lambda function event source mapping
306
+ * ```javascript
307
+ * // This operation updates a Lambda function event source mapping
308
+ * const input = {
309
+ * "BatchSize": 123,
310
+ * "Enabled": true,
311
+ * "FunctionName": "myFunction",
312
+ * "UUID": "1234xCy789012"
313
+ * };
314
+ * const command = new UpdateEventSourceMappingCommand(input);
315
+ * const response = await client.send(command);
316
+ * /* response ==
317
+ * {
318
+ * "BatchSize": 123,
319
+ * "EventSourceArn": "arn:aws:s3:::examplebucket/*",
320
+ * "FunctionArn": "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
321
+ * "LastModified": "2016-11-21T19:49:20.006+0000",
322
+ * "LastProcessingResult": "",
323
+ * "State": "",
324
+ * "StateTransitionReason": "",
325
+ * "UUID": "1234xCy789012"
326
+ * }
327
+ * *\/
328
+ * // example id: to-update-a-lambda-function-event-source-mapping-1481650907413
329
+ * ```
330
+ *
305
331
  */
306
332
  export declare class UpdateEventSourceMappingCommand extends UpdateEventSourceMappingCommand_base {
307
333
  /** @internal type navigation helper, not in runtime. */
@@ -223,6 +223,39 @@ declare const UpdateFunctionCodeCommand_base: {
223
223
  * <p>Base exception class for all service exceptions from Lambda service.</p>
224
224
  *
225
225
  * @public
226
+ * @example To update a Lambda function's code
227
+ * ```javascript
228
+ * // The following example replaces the code of the unpublished ($LATEST) version of a function named my-function with the contents of the specified zip file in Amazon S3.
229
+ * const input = {
230
+ * "FunctionName": "my-function",
231
+ * "S3Bucket": "my-bucket-1xpuxmplzrlbh",
232
+ * "S3Key": "function.zip"
233
+ * };
234
+ * const command = new UpdateFunctionCodeCommand(input);
235
+ * const response = await client.send(command);
236
+ * /* response ==
237
+ * {
238
+ * "CodeSha256": "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
239
+ * "CodeSize": 308,
240
+ * "Description": "",
241
+ * "FunctionArn": "arn:aws:lambda:us-east-2:123456789012:function:my-function",
242
+ * "FunctionName": "my-function",
243
+ * "Handler": "index.handler",
244
+ * "LastModified": "2019-08-14T22:26:11.234+0000",
245
+ * "MemorySize": 128,
246
+ * "RevisionId": "873282ed-xmpl-4dc8-a069-d0c647e470c6",
247
+ * "Role": "arn:aws:iam::123456789012:role/lambda-role",
248
+ * "Runtime": "nodejs12.x",
249
+ * "Timeout": 3,
250
+ * "TracingConfig": {
251
+ * "Mode": "PassThrough"
252
+ * },
253
+ * "Version": "$LATEST"
254
+ * }
255
+ * *\/
256
+ * // example id: to-update-a-lambda-functions-code-1481650992672
257
+ * ```
258
+ *
226
259
  */
227
260
  export declare class UpdateFunctionCodeCommand extends UpdateFunctionCodeCommand_base {
228
261
  /** @internal type navigation helper, not in runtime. */
@@ -263,6 +263,38 @@ declare const UpdateFunctionConfigurationCommand_base: {
263
263
  * <p>Base exception class for all service exceptions from Lambda service.</p>
264
264
  *
265
265
  * @public
266
+ * @example To update a Lambda function's configuration
267
+ * ```javascript
268
+ * // The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.
269
+ * const input = {
270
+ * "FunctionName": "my-function",
271
+ * "MemorySize": 256
272
+ * };
273
+ * const command = new UpdateFunctionConfigurationCommand(input);
274
+ * const response = await client.send(command);
275
+ * /* response ==
276
+ * {
277
+ * "CodeSha256": "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
278
+ * "CodeSize": 308,
279
+ * "Description": "",
280
+ * "FunctionArn": "arn:aws:lambda:us-east-2:123456789012:function:my-function",
281
+ * "FunctionName": "my-function",
282
+ * "Handler": "index.handler",
283
+ * "LastModified": "2019-08-14T22:26:11.234+0000",
284
+ * "MemorySize": 256,
285
+ * "RevisionId": "873282ed-xmpl-4dc8-a069-d0c647e470c6",
286
+ * "Role": "arn:aws:iam::123456789012:role/lambda-role",
287
+ * "Runtime": "nodejs12.x",
288
+ * "Timeout": 3,
289
+ * "TracingConfig": {
290
+ * "Mode": "PassThrough"
291
+ * },
292
+ * "Version": "$LATEST"
293
+ * }
294
+ * *\/
295
+ * // example id: to-update-a-lambda-functions-configuration-1481651096447
296
+ * ```
297
+ *
266
298
  */
267
299
  export declare class UpdateFunctionConfigurationCommand extends UpdateFunctionConfigurationCommand_base {
268
300
  /** @internal type navigation helper, not in runtime. */
@@ -93,6 +93,36 @@ declare const UpdateFunctionEventInvokeConfigCommand_base: {
93
93
  * <p>Base exception class for all service exceptions from Lambda service.</p>
94
94
  *
95
95
  * @public
96
+ * @example To update an asynchronous invocation configuration
97
+ * ```javascript
98
+ * // The following example adds an on-failure destination to the existing asynchronous invocation configuration for a function named my-function.
99
+ * const input = {
100
+ * "DestinationConfig": {
101
+ * "OnFailure": {
102
+ * "Destination": "arn:aws:sqs:us-east-2:123456789012:destination"
103
+ * }
104
+ * },
105
+ * "FunctionName": "my-function"
106
+ * };
107
+ * const command = new UpdateFunctionEventInvokeConfigCommand(input);
108
+ * const response = await client.send(command);
109
+ * /* response ==
110
+ * {
111
+ * "DestinationConfig": {
112
+ * "OnFailure": {
113
+ * "Destination": "arn:aws:sqs:us-east-2:123456789012:destination"
114
+ * },
115
+ * "OnSuccess": {}
116
+ * },
117
+ * "FunctionArn": "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
118
+ * "LastModified": 1573687896.493,
119
+ * "MaximumEventAgeInSeconds": 3600,
120
+ * "MaximumRetryAttempts": 0
121
+ * }
122
+ * *\/
123
+ * // example id: to-update-an-asynchronous-invocation-configuration-1586492061186
124
+ * ```
125
+ *
96
126
  */
97
127
  export declare class UpdateFunctionEventInvokeConfigCommand extends UpdateFunctionEventInvokeConfigCommand_base {
98
128
  /** @internal type navigation helper, not in runtime. */
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.655.0",
4
+ "version": "3.656.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-lambda",