aws-sdk-lambda 1.38.0 → 1.43.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 104c2c8d13f900e96a45d52e746abe9688ded378
4
- data.tar.gz: 3283d44dcf5309b89ad0a39649041fbf8017e03e
2
+ SHA256:
3
+ metadata.gz: a72ac9eca724ac3de39dde2da7f5955df9b86ee62e7b8bf10a0f030d8e8cb73c
4
+ data.tar.gz: 5de0da491f19c20090fc8a039d931843771f4c92cfec48dee294797e6d2198fd
5
5
  SHA512:
6
- metadata.gz: 6c43cd63091e74724acc1eecf13cf7583966188c3985c192744d614a3a7d9880cbfb34b1f3fd0f570c3e51b513ff2350882e0cf6e60abddc61b9dcc2590e8c49
7
- data.tar.gz: 0c1a770dacabbe8a917c41ca729c4a9cbd336b98f2a07542adc202cc405239013f89594b8636f7b65113cf95b5cddb50ea84baff0baee891f893281eb787ac08
6
+ metadata.gz: 388fe3ed0713d0eba9d36002cc0403123a928617684377fddf85f63c9018657d2cd38efeace6faf8befc85e8c1516c8e32bfb93b4c9372f14e46293a07125c9c
7
+ data.tar.gz: c98490e46627985d1f29505e2b7e916de9e199b8d8367e0ed630f94e62d945595970fa5ac5cb17d6bf12cbfbf32d2fd7edf4923bef7a5a40e524ee36ed9e2b8f
@@ -46,6 +46,6 @@ require_relative 'aws-sdk-lambda/customizations'
46
46
  # @service
47
47
  module Aws::Lambda
48
48
 
49
- GEM_VERSION = '1.38.0'
49
+ GEM_VERSION = '1.43.1'
50
50
 
51
51
  end
@@ -24,6 +24,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
28
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
29
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
29
30
 
@@ -69,6 +70,7 @@ module Aws::Lambda
69
70
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
70
71
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
71
72
  add_plugin(Aws::Plugins::TransferEncoding)
73
+ add_plugin(Aws::Plugins::HttpChecksum)
72
74
  add_plugin(Aws::Plugins::SignatureV4)
73
75
  add_plugin(Aws::Plugins::Protocols::RestJson)
74
76
 
@@ -105,7 +107,7 @@ module Aws::Lambda
105
107
  # @option options [required, String] :region
106
108
  # The AWS region to connect to. The configured `:region` is
107
109
  # used to determine the service `:endpoint`. When not passed,
108
- # a default `:region` is search for in the following locations:
110
+ # a default `:region` is searched for in the following locations:
109
111
  #
110
112
  # * `Aws.config[:region]`
111
113
  # * `ENV['AWS_REGION']`
@@ -161,7 +163,7 @@ module Aws::Lambda
161
163
  # @option options [String] :endpoint
162
164
  # The client endpoint is normally constructed from the `:region`
163
165
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be avalid HTTP(S) URI.
166
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
167
  #
166
168
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
169
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -176,7 +178,7 @@ module Aws::Lambda
176
178
  # requests fetching endpoints information. Defaults to 60 sec.
177
179
  #
178
180
  # @option options [Boolean] :endpoint_discovery (false)
179
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
181
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
180
182
  #
181
183
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
182
184
  # The log formatter.
@@ -351,6 +353,25 @@ module Aws::Lambda
351
353
  # * {Types::AddLayerVersionPermissionResponse#statement #statement} => String
352
354
  # * {Types::AddLayerVersionPermissionResponse#revision_id #revision_id} => String
353
355
  #
356
+ #
357
+ # @example Example: To add permissions to a layer version
358
+ #
359
+ # # The following example grants permission for the account 223456789012 to use version 1 of a layer named my-layer.
360
+ #
361
+ # resp = client.add_layer_version_permission({
362
+ # action: "lambda:GetLayerVersion",
363
+ # layer_name: "my-layer",
364
+ # principal: "223456789012",
365
+ # statement_id: "xaccount",
366
+ # version_number: 1,
367
+ # })
368
+ #
369
+ # resp.to_h outputs the following:
370
+ # {
371
+ # revision_id: "35d87451-f796-4a3f-a618-95a3671b0a0c",
372
+ # statement: "{\"Sid\":\"xaccount\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::223456789012:root\"},\"Action\":\"lambda:GetLayerVersion\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1\"}",
373
+ # }
374
+ #
354
375
  # @example Request syntax with placeholder values
355
376
  #
356
377
  # resp = client.add_layer_version_permission({
@@ -458,22 +479,39 @@ module Aws::Lambda
458
479
  # * {Types::AddPermissionResponse#statement #statement} => String
459
480
  #
460
481
  #
461
- # @example Example: add-permission
482
+ # @example Example: To grant Amazon S3 permission to invoke a function
462
483
  #
463
- # # This example adds a permission for an S3 bucket to invoke a Lambda function.
484
+ # # The following example adds permission for Amazon S3 to invoke a Lambda function named my-function for notifications from
485
+ # # a bucket named my-bucket-1xpuxmplzrlbh in account 123456789012.
464
486
  #
465
487
  # resp = client.add_permission({
466
488
  # action: "lambda:InvokeFunction",
467
- # function_name: "MyFunction",
489
+ # function_name: "my-function",
468
490
  # principal: "s3.amazonaws.com",
469
491
  # source_account: "123456789012",
470
- # source_arn: "arn:aws:s3:::examplebucket/*",
471
- # statement_id: "ID-1",
492
+ # source_arn: "arn:aws:s3:::my-bucket-1xpuxmplzrlbh/*",
493
+ # statement_id: "s3",
472
494
  # })
473
495
  #
474
496
  # resp.to_h outputs the following:
475
497
  # {
476
- # statement: "ID-1",
498
+ # statement: "{\"Sid\":\"s3\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"s3.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:function:my-function\",\"Condition\":{\"StringEquals\":{\"AWS:SourceAccount\":\"123456789012\"},\"ArnLike\":{\"AWS:SourceArn\":\"arn:aws:s3:::my-bucket-1xpuxmplzrlbh\"}}}",
499
+ # }
500
+ #
501
+ # @example Example: To grant another account permission to invoke a function
502
+ #
503
+ # # The following example adds permission for account 223456789012 invoke a Lambda function named my-function.
504
+ #
505
+ # resp = client.add_permission({
506
+ # action: "lambda:InvokeFunction",
507
+ # function_name: "my-function",
508
+ # principal: "223456789012",
509
+ # statement_id: "xaccount",
510
+ # })
511
+ #
512
+ # resp.to_h outputs the following:
513
+ # {
514
+ # statement: "{\"Sid\":\"xaccount\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::223456789012:root\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:function:my-function\"}",
477
515
  # }
478
516
  #
479
517
  # @example Request syntax with placeholder values
@@ -555,6 +593,27 @@ module Aws::Lambda
555
593
  # * {Types::AliasConfiguration#routing_config #routing_config} => Types::AliasRoutingConfiguration
556
594
  # * {Types::AliasConfiguration#revision_id #revision_id} => String
557
595
  #
596
+ #
597
+ # @example Example: To create an alias for a Lambda function
598
+ #
599
+ # # The following example creates an alias named LIVE that points to version 1 of the my-function Lambda function.
600
+ #
601
+ # resp = client.create_alias({
602
+ # description: "alias for live version of function",
603
+ # function_name: "my-function",
604
+ # function_version: "1",
605
+ # name: "LIVE",
606
+ # })
607
+ #
608
+ # resp.to_h outputs the following:
609
+ # {
610
+ # alias_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:LIVE",
611
+ # description: "alias for live version of function",
612
+ # function_version: "1",
613
+ # name: "LIVE",
614
+ # revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
615
+ # }
616
+ #
558
617
  # @example Request syntax with placeholder values
559
618
  #
560
619
  # resp = client.create_alias({
@@ -713,6 +772,28 @@ module Aws::Lambda
713
772
  # * {Types::EventSourceMappingConfiguration#bisect_batch_on_function_error #bisect_batch_on_function_error} => Boolean
714
773
  # * {Types::EventSourceMappingConfiguration#maximum_retry_attempts #maximum_retry_attempts} => Integer
715
774
  #
775
+ #
776
+ # @example Example: To create a mapping between an event source and an AWS Lambda function
777
+ #
778
+ # # The following example creates a mapping between an SQS queue and the my-function Lambda function.
779
+ #
780
+ # resp = client.create_event_source_mapping({
781
+ # batch_size: 5,
782
+ # event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
783
+ # function_name: "my-function",
784
+ # })
785
+ #
786
+ # resp.to_h outputs the following:
787
+ # {
788
+ # batch_size: 5,
789
+ # event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
790
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
791
+ # last_modified: Time.parse(1569284520.333),
792
+ # state: "Creating",
793
+ # state_transition_reason: "USER_INITIATED",
794
+ # uuid: "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
795
+ # }
796
+ #
716
797
  # @example Request syntax with placeholder values
717
798
  #
718
799
  # resp = client.create_event_source_mapping({
@@ -942,41 +1023,66 @@ module Aws::Lambda
942
1023
  # * {Types::FunctionConfiguration#last_update_status_reason_code #last_update_status_reason_code} => String
943
1024
  #
944
1025
  #
945
- # @example Example: create-function
1026
+ # @example Example: To create a function
946
1027
  #
947
- # # This example creates a Lambda function.
1028
+ # # The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and
1029
+ # # environment variable encryption.
948
1030
  #
949
1031
  # resp = client.create_function({
950
1032
  # code: {
1033
+ # s3_bucket: "my-bucket-1xpuxmplzrlbh",
1034
+ # s3_key: "function.zip",
951
1035
  # },
952
- # description: "",
953
- # function_name: "MyFunction",
954
- # handler: "souce_file.handler_name", # is of the form of the name of your source file and then name of your function handler
955
- # memory_size: 128,
1036
+ # description: "Process image objects from Amazon S3.",
1037
+ # environment: {
1038
+ # variables: {
1039
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
1040
+ # "PREFIX" => "inbound",
1041
+ # },
1042
+ # },
1043
+ # function_name: "my-function",
1044
+ # handler: "index.handler",
1045
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
1046
+ # memory_size: 256,
956
1047
  # publish: true,
957
- # role: "arn:aws:iam::123456789012:role/service-role/role-name", # replace with the actual arn of the execution role you created
1048
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
958
1049
  # runtime: "nodejs12.x",
1050
+ # tags: {
1051
+ # "DEPARTMENT" => "Assets",
1052
+ # },
959
1053
  # timeout: 15,
960
- # vpc_config: {
1054
+ # tracing_config: {
1055
+ # mode: "Active",
961
1056
  # },
962
1057
  # })
963
1058
  #
964
1059
  # resp.to_h outputs the following:
965
1060
  # {
966
- # code_sha_256: "",
967
- # code_size: 123,
968
- # description: "",
969
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:MyFunction",
970
- # function_name: "MyFunction",
971
- # handler: "source_file.handler_name",
972
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
973
- # memory_size: 128,
974
- # role: "arn:aws:iam::123456789012:role/service-role/role-name",
1061
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
1062
+ # code_size: 5797206,
1063
+ # description: "Process image objects from Amazon S3.",
1064
+ # environment: {
1065
+ # variables: {
1066
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
1067
+ # "PREFIX" => "inbound",
1068
+ # },
1069
+ # },
1070
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
1071
+ # function_name: "my-function",
1072
+ # handler: "index.handler",
1073
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
1074
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
1075
+ # last_update_status: "Successful",
1076
+ # memory_size: 256,
1077
+ # revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
1078
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
975
1079
  # runtime: "nodejs12.x",
976
- # timeout: 123,
977
- # version: "1",
978
- # vpc_config: {
1080
+ # state: "Active",
1081
+ # timeout: 15,
1082
+ # tracing_config: {
1083
+ # mode: "Active",
979
1084
  # },
1085
+ # version: "1",
980
1086
  # }
981
1087
  #
982
1088
  # @example Request syntax with placeholder values
@@ -1094,11 +1200,11 @@ module Aws::Lambda
1094
1200
  #
1095
1201
  # @example Example: To delete a Lambda function alias
1096
1202
  #
1097
- # # This operation deletes a Lambda function alias
1203
+ # # The following example deletes an alias named BLUE from a function named my-function
1098
1204
  #
1099
1205
  # resp = client.delete_alias({
1100
- # function_name: "myFunction",
1101
- # name: "alias",
1206
+ # function_name: "my-function",
1207
+ # name: "BLUE",
1102
1208
  # })
1103
1209
  #
1104
1210
  # @example Request syntax with placeholder values
@@ -1150,22 +1256,21 @@ module Aws::Lambda
1150
1256
  #
1151
1257
  # @example Example: To delete a Lambda function event source mapping
1152
1258
  #
1153
- # # This operation deletes a Lambda function event source mapping
1259
+ # # The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
1154
1260
  #
1155
1261
  # resp = client.delete_event_source_mapping({
1156
- # uuid: "12345kxodurf3443",
1262
+ # uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
1157
1263
  # })
1158
1264
  #
1159
1265
  # resp.to_h outputs the following:
1160
1266
  # {
1161
- # batch_size: 123,
1162
- # event_source_arn: "arn:aws:s3:::examplebucket/*",
1163
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
1164
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
1165
- # last_processing_result: "",
1166
- # state: "",
1167
- # state_transition_reason: "",
1168
- # uuid: "12345kxodurf3443",
1267
+ # batch_size: 5,
1268
+ # event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
1269
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
1270
+ # last_modified: Time.parse("${timestamp}"),
1271
+ # state: "Enabled",
1272
+ # state_transition_reason: "USER_INITIATED",
1273
+ # uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
1169
1274
  # }
1170
1275
  #
1171
1276
  # @example Request syntax with placeholder values
@@ -1234,12 +1339,12 @@ module Aws::Lambda
1234
1339
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1235
1340
  #
1236
1341
  #
1237
- # @example Example: To delete a Lambda function
1342
+ # @example Example: To delete a version of a Lambda function
1238
1343
  #
1239
- # # This operation deletes a Lambda function
1344
+ # # The following example deletes version 1 of a Lambda function named my-function.
1240
1345
  #
1241
1346
  # resp = client.delete_function({
1242
- # function_name: "myFunction",
1347
+ # function_name: "my-function",
1243
1348
  # qualifier: "1",
1244
1349
  # })
1245
1350
  #
@@ -1278,6 +1383,15 @@ module Aws::Lambda
1278
1383
  #
1279
1384
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1280
1385
  #
1386
+ #
1387
+ # @example Example: To remove the reserved concurrent execution limit from a function
1388
+ #
1389
+ # # The following example deletes the reserved concurrent execution limit from a function named my-function.
1390
+ #
1391
+ # resp = client.delete_function_concurrency({
1392
+ # function_name: "my-function",
1393
+ # })
1394
+ #
1281
1395
  # @example Request syntax with placeholder values
1282
1396
  #
1283
1397
  # resp = client.delete_function_concurrency({
@@ -1321,6 +1435,17 @@ module Aws::Lambda
1321
1435
  #
1322
1436
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1323
1437
  #
1438
+ #
1439
+ # @example Example: To delete an asynchronous invocation configuration
1440
+ #
1441
+ # # The following example deletes the asynchronous invocation configuration for the GREEN alias of a function named
1442
+ # # my-function.
1443
+ #
1444
+ # resp = client.delete_function_event_invoke_config({
1445
+ # function_name: "my-function",
1446
+ # qualifier: "GREEN",
1447
+ # })
1448
+ #
1324
1449
  # @example Request syntax with placeholder values
1325
1450
  #
1326
1451
  # resp = client.delete_function_event_invoke_config({
@@ -1353,6 +1478,16 @@ module Aws::Lambda
1353
1478
  #
1354
1479
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1355
1480
  #
1481
+ #
1482
+ # @example Example: To delete a version of a Lambda layer
1483
+ #
1484
+ # # The following example deletes version 2 of a layer named my-layer.
1485
+ #
1486
+ # resp = client.delete_layer_version({
1487
+ # layer_name: "my-layer",
1488
+ # version_number: 2,
1489
+ # })
1490
+ #
1356
1491
  # @example Request syntax with placeholder values
1357
1492
  #
1358
1493
  # resp = client.delete_layer_version({
@@ -1391,6 +1526,17 @@ module Aws::Lambda
1391
1526
  #
1392
1527
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1393
1528
  #
1529
+ #
1530
+ # @example Example: To delete a provisioned concurrency configuration
1531
+ #
1532
+ # # The following example deletes the provisioned concurrency configuration for the GREEN alias of a function named
1533
+ # # my-function.
1534
+ #
1535
+ # resp = client.delete_provisioned_concurrency_config({
1536
+ # function_name: "my-function",
1537
+ # qualifier: "GREEN",
1538
+ # })
1539
+ #
1394
1540
  # @example Request syntax with placeholder values
1395
1541
  #
1396
1542
  # resp = client.delete_provisioned_concurrency_config({
@@ -1420,9 +1566,9 @@ module Aws::Lambda
1420
1566
  # * {Types::GetAccountSettingsResponse#account_usage #account_usage} => Types::AccountUsage
1421
1567
  #
1422
1568
  #
1423
- # @example Example: To retrieves a Lambda customer's account settings
1569
+ # @example Example: To get account settings
1424
1570
  #
1425
- # # This operation retrieves a Lambda customer's account settings
1571
+ # # This operation takes no parameters and returns details about storage and concurrency quotas in the current Region.
1426
1572
  #
1427
1573
  # resp = client.get_account_settings({
1428
1574
  # })
@@ -1430,8 +1576,15 @@ module Aws::Lambda
1430
1576
  # resp.to_h outputs the following:
1431
1577
  # {
1432
1578
  # account_limit: {
1579
+ # code_size_unzipped: 262144000,
1580
+ # code_size_zipped: 52428800,
1581
+ # concurrent_executions: 1000,
1582
+ # total_code_size: 80530636800,
1583
+ # unreserved_concurrent_executions: 1000,
1433
1584
  # },
1434
1585
  # account_usage: {
1586
+ # function_count: 4,
1587
+ # total_code_size: 9426,
1435
1588
  # },
1436
1589
  # }
1437
1590
  #
@@ -1488,21 +1641,22 @@ module Aws::Lambda
1488
1641
  # * {Types::AliasConfiguration#revision_id #revision_id} => String
1489
1642
  #
1490
1643
  #
1491
- # @example Example: To retrieve a Lambda function alias
1644
+ # @example Example: To get a Lambda function alias
1492
1645
  #
1493
- # # This operation retrieves a Lambda function alias
1646
+ # # The following example returns details about an alias named BLUE for a function named my-function
1494
1647
  #
1495
1648
  # resp = client.get_alias({
1496
- # function_name: "myFunction",
1497
- # name: "myFunctionAlias",
1649
+ # function_name: "my-function",
1650
+ # name: "BLUE",
1498
1651
  # })
1499
1652
  #
1500
1653
  # resp.to_h outputs the following:
1501
1654
  # {
1502
- # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunctionAlias",
1503
- # description: "",
1504
- # function_version: "1",
1505
- # name: "myFunctionAlias",
1655
+ # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BLUE",
1656
+ # description: "Production environment BLUE.",
1657
+ # function_version: "3",
1658
+ # name: "BLUE",
1659
+ # revision_id: "594f41fb-xmpl-4c20-95c7-6ca5f2a92c93",
1506
1660
  # }
1507
1661
  #
1508
1662
  # @example Request syntax with placeholder values
@@ -1555,24 +1709,30 @@ module Aws::Lambda
1555
1709
  # * {Types::EventSourceMappingConfiguration#maximum_retry_attempts #maximum_retry_attempts} => Integer
1556
1710
  #
1557
1711
  #
1558
- # @example Example: To retrieve a Lambda function's event source mapping
1712
+ # @example Example: To get a Lambda function's event source mapping
1559
1713
  #
1560
- # # This operation retrieves a Lambda function's event source mapping
1714
+ # # The following example returns details about an event source mapping. To get a mapping's UUID, use
1715
+ # # ListEventSourceMappings.
1561
1716
  #
1562
1717
  # resp = client.get_event_source_mapping({
1563
- # uuid: "123489-xxxxx-kdla8d89d7",
1718
+ # uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
1564
1719
  # })
1565
1720
  #
1566
1721
  # resp.to_h outputs the following:
1567
1722
  # {
1568
- # batch_size: 123,
1569
- # event_source_arn: "arn:aws:iam::123456789012:eventsource",
1570
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
1571
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
1572
- # last_processing_result: "",
1573
- # state: "",
1574
- # state_transition_reason: "",
1575
- # uuid: "123489-xxxxx-kdla8d89d7",
1723
+ # batch_size: 500,
1724
+ # bisect_batch_on_function_error: false,
1725
+ # destination_config: {
1726
+ # },
1727
+ # event_source_arn: "arn:aws:sqs:us-east-2:123456789012:mySQSqueue",
1728
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:myFunction",
1729
+ # last_modified: Time.parse("${timestamp}"),
1730
+ # last_processing_result: "No records processed",
1731
+ # maximum_record_age_in_seconds: 604800,
1732
+ # maximum_retry_attempts: 10000,
1733
+ # state: "Creating",
1734
+ # state_transition_reason: "User action",
1735
+ # uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
1576
1736
  # }
1577
1737
  #
1578
1738
  # @example Request syntax with placeholder values
@@ -1642,45 +1802,50 @@ module Aws::Lambda
1642
1802
  # * {Types::GetFunctionResponse#concurrency #concurrency} => Types::Concurrency
1643
1803
  #
1644
1804
  #
1645
- # @example Example: To retrieve a Lambda function's event source mapping
1805
+ # @example Example: To get a Lambda function
1646
1806
  #
1647
- # # This operation retrieves a Lambda function's event source mapping
1807
+ # # The following example returns code and configuration details for version 1 of a function named my-function.
1648
1808
  #
1649
1809
  # resp = client.get_function({
1650
- # function_name: "myFunction",
1810
+ # function_name: "my-function",
1651
1811
  # qualifier: "1",
1652
1812
  # })
1653
1813
  #
1654
1814
  # resp.to_h outputs the following:
1655
1815
  # {
1656
1816
  # code: {
1657
- # location: "somelocation",
1817
+ # location: "https://awslambda-us-west-2-tasks.s3.us-west-2.amazonaws.com/snapshots/123456789012/my-function-e7d9d1ed-xmpl-4f79-904a-4b87f2681f30?versionId=sH3TQwBOaUy...",
1658
1818
  # repository_type: "S3",
1659
1819
  # },
1660
1820
  # configuration: {
1661
- # code_sha_256: "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
1662
- # code_size: 262,
1663
- # description: "A starter AWS Lambda function.",
1821
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
1822
+ # code_size: 5797206,
1823
+ # description: "Process image objects from Amazon S3.",
1664
1824
  # environment: {
1665
1825
  # variables: {
1666
- # "S3_BUCKET" => "test",
1826
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
1827
+ # "PREFIX" => "inbound",
1667
1828
  # },
1668
1829
  # },
1669
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
1670
- # function_name: "myFunction",
1830
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
1831
+ # function_name: "my-function",
1671
1832
  # handler: "index.handler",
1672
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
1673
- # memory_size: 128,
1674
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
1833
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
1834
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
1835
+ # last_update_status: "Successful",
1836
+ # memory_size: 256,
1837
+ # revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
1838
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
1675
1839
  # runtime: "nodejs12.x",
1676
- # timeout: 3,
1677
- # version: "$LATEST",
1678
- # vpc_config: {
1679
- # security_group_ids: [
1680
- # ],
1681
- # subnet_ids: [
1682
- # ],
1840
+ # state: "Active",
1841
+ # timeout: 15,
1842
+ # tracing_config: {
1843
+ # mode: "Active",
1683
1844
  # },
1845
+ # version: "$LATEST",
1846
+ # },
1847
+ # tags: {
1848
+ # "DEPARTMENT" => "Assets",
1684
1849
  # },
1685
1850
  # }
1686
1851
  #
@@ -1771,6 +1936,20 @@ module Aws::Lambda
1771
1936
  #
1772
1937
  # * {Types::GetFunctionConcurrencyResponse#reserved_concurrent_executions #reserved_concurrent_executions} => Integer
1773
1938
  #
1939
+ #
1940
+ # @example Example: To get the reserved concurrency setting for a function
1941
+ #
1942
+ # # The following example returns the reserved concurrency setting for a function named my-function.
1943
+ #
1944
+ # resp = client.get_function_concurrency({
1945
+ # function_name: "my-function",
1946
+ # })
1947
+ #
1948
+ # resp.to_h outputs the following:
1949
+ # {
1950
+ # reserved_concurrent_executions: 250,
1951
+ # }
1952
+ #
1774
1953
  # @example Request syntax with placeholder values
1775
1954
  #
1776
1955
  # resp = client.get_function_concurrency({
@@ -1848,36 +2027,42 @@ module Aws::Lambda
1848
2027
  # * {Types::FunctionConfiguration#last_update_status_reason_code #last_update_status_reason_code} => String
1849
2028
  #
1850
2029
  #
1851
- # @example Example: To retrieve a Lambda function's event source mapping
2030
+ # @example Example: To get a Lambda function's event source mapping
1852
2031
  #
1853
- # # This operation retrieves a Lambda function's event source mapping
2032
+ # # The following example returns and configuration details for version 1 of a function named my-function.
1854
2033
  #
1855
2034
  # resp = client.get_function_configuration({
1856
- # function_name: "myFunction",
2035
+ # function_name: "my-function",
1857
2036
  # qualifier: "1",
1858
2037
  # })
1859
2038
  #
1860
2039
  # resp.to_h outputs the following:
1861
2040
  # {
1862
- # code_sha_256: "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
1863
- # code_size: 123,
1864
- # dead_letter_config: {
1865
- # },
1866
- # description: "",
2041
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
2042
+ # code_size: 5797206,
2043
+ # description: "Process image objects from Amazon S3.",
1867
2044
  # environment: {
2045
+ # variables: {
2046
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
2047
+ # "PREFIX" => "inbound",
2048
+ # },
1868
2049
  # },
1869
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
1870
- # function_name: "myFunction",
2050
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
2051
+ # function_name: "my-function",
1871
2052
  # handler: "index.handler",
1872
- # kms_key_arn: "",
1873
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
1874
- # memory_size: 128,
1875
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
1876
- # runtime: "python2.7",
1877
- # timeout: 123,
1878
- # version: "1",
1879
- # vpc_config: {
2053
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
2054
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
2055
+ # last_update_status: "Successful",
2056
+ # memory_size: 256,
2057
+ # revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
2058
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
2059
+ # runtime: "nodejs12.x",
2060
+ # state: "Active",
2061
+ # timeout: 15,
2062
+ # tracing_config: {
2063
+ # mode: "Active",
1880
2064
  # },
2065
+ # version: "$LATEST",
1881
2066
  # }
1882
2067
  #
1883
2068
  # @example Request syntax with placeholder values
@@ -1974,6 +2159,32 @@ module Aws::Lambda
1974
2159
  # * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
1975
2160
  # * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
1976
2161
  #
2162
+ #
2163
+ # @example Example: To get an asynchronous invocation configuration
2164
+ #
2165
+ # # The following example returns the asynchronous invocation configuration for the BLUE alias of a function named
2166
+ # # my-function.
2167
+ #
2168
+ # resp = client.get_function_event_invoke_config({
2169
+ # function_name: "my-function",
2170
+ # qualifier: "BLUE",
2171
+ # })
2172
+ #
2173
+ # resp.to_h outputs the following:
2174
+ # {
2175
+ # destination_config: {
2176
+ # on_failure: {
2177
+ # destination: "arn:aws:sqs:us-east-2:123456789012:failed-invocations",
2178
+ # },
2179
+ # on_success: {
2180
+ # },
2181
+ # },
2182
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
2183
+ # last_modified: Time.parse("${timestamp}"),
2184
+ # maximum_event_age_in_seconds: 3600,
2185
+ # maximum_retry_attempts: 0,
2186
+ # }
2187
+ #
1977
2188
  # @example Request syntax with placeholder values
1978
2189
  #
1979
2190
  # resp = client.get_function_event_invoke_config({
@@ -2023,6 +2234,35 @@ module Aws::Lambda
2023
2234
  # * {Types::GetLayerVersionResponse#compatible_runtimes #compatible_runtimes} => Array<String>
2024
2235
  # * {Types::GetLayerVersionResponse#license_info #license_info} => String
2025
2236
  #
2237
+ #
2238
+ # @example Example: To get information about a Lambda layer version
2239
+ #
2240
+ # # The following example returns information for version 1 of a layer named my-layer.
2241
+ #
2242
+ # resp = client.get_layer_version({
2243
+ # layer_name: "my-layer",
2244
+ # version_number: 1,
2245
+ # })
2246
+ #
2247
+ # resp.to_h outputs the following:
2248
+ # {
2249
+ # compatible_runtimes: [
2250
+ # "python3.6",
2251
+ # "python3.7",
2252
+ # ],
2253
+ # content: {
2254
+ # code_sha_256: "tv9jJO+rPbXUUXuRKi7CwHzKtLDkDRJLB3cC3Z/ouXo=",
2255
+ # code_size: 169,
2256
+ # location: "https://awslambda-us-east-2-layers.s3.us-east-2.amazonaws.com/snapshots/123456789012/my-layer-4aaa2fbb-ff77-4b0a-ad92-5b78a716a96a?versionId=27iWyA73cCAYqyH...",
2257
+ # },
2258
+ # created_date: Time.parse("2018-11-14T23:03:52.894+0000"),
2259
+ # description: "My Python layer",
2260
+ # layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer",
2261
+ # layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1",
2262
+ # license_info: "MIT",
2263
+ # version: 1,
2264
+ # }
2265
+ #
2026
2266
  # @example Request syntax with placeholder values
2027
2267
  #
2028
2268
  # resp = client.get_layer_version({
@@ -2074,6 +2314,32 @@ module Aws::Lambda
2074
2314
  # * {Types::GetLayerVersionResponse#compatible_runtimes #compatible_runtimes} => Array<String>
2075
2315
  # * {Types::GetLayerVersionResponse#license_info #license_info} => String
2076
2316
  #
2317
+ #
2318
+ # @example Example: To get information about a Lambda layer version
2319
+ #
2320
+ # # The following example returns information about the layer version with the specified Amazon Resource Name (ARN).
2321
+ #
2322
+ # resp = client.get_layer_version_by_arn({
2323
+ # arn: "arn:aws:lambda:ca-central-1:123456789012:layer:blank-python-lib:3",
2324
+ # })
2325
+ #
2326
+ # resp.to_h outputs the following:
2327
+ # {
2328
+ # compatible_runtimes: [
2329
+ # "python3.8",
2330
+ # ],
2331
+ # content: {
2332
+ # code_sha_256: "6x+xmpl/M3BnQUk7gS9sGmfeFsR/npojXoA3fZUv4eU=",
2333
+ # code_size: 9529009,
2334
+ # location: "https://awslambda-us-east-2-layers.s3.us-east-2.amazonaws.com/snapshots/123456789012/blank-python-lib-e5212378-xmpl-44ee-8398-9d8ec5113949?versionId=WbZnvf...",
2335
+ # },
2336
+ # created_date: Time.parse("2020-03-31T00:35:18.949+0000"),
2337
+ # description: "Dependencies for the blank-python sample app.",
2338
+ # layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-python-lib",
2339
+ # layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-python-lib:3",
2340
+ # version: 3,
2341
+ # }
2342
+ #
2077
2343
  # @example Request syntax with placeholder values
2078
2344
  #
2079
2345
  # resp = client.get_layer_version_by_arn({
@@ -2177,16 +2443,17 @@ module Aws::Lambda
2177
2443
  #
2178
2444
  # @example Example: To retrieve a Lambda function policy
2179
2445
  #
2180
- # # This operation retrieves a Lambda function policy
2446
+ # # The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
2181
2447
  #
2182
2448
  # resp = client.get_policy({
2183
- # function_name: "myFunction",
2449
+ # function_name: "my-function",
2184
2450
  # qualifier: "1",
2185
2451
  # })
2186
2452
  #
2187
2453
  # resp.to_h outputs the following:
2188
2454
  # {
2189
- # policy: "",
2455
+ # policy: "{\"Version\":\"2012-10-17\",\"Id\":\"default\",\"Statement\":[{\"Sid\":\"xaccount\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-east-2:123456789012:function:my-function:1\"}]}",
2456
+ # revision_id: "4843f2f6-7c59-4fda-b484-afd0bc0e22b8",
2190
2457
  # }
2191
2458
  #
2192
2459
  # @example Request syntax with placeholder values
@@ -2240,6 +2507,45 @@ module Aws::Lambda
2240
2507
  # * {Types::GetProvisionedConcurrencyConfigResponse#status_reason #status_reason} => String
2241
2508
  # * {Types::GetProvisionedConcurrencyConfigResponse#last_modified #last_modified} => Time
2242
2509
  #
2510
+ #
2511
+ # @example Example: To get a provisioned concurrency configuration
2512
+ #
2513
+ # # The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified
2514
+ # # function.
2515
+ #
2516
+ # resp = client.get_provisioned_concurrency_config({
2517
+ # function_name: "my-function",
2518
+ # qualifier: "BLUE",
2519
+ # })
2520
+ #
2521
+ # resp.to_h outputs the following:
2522
+ # {
2523
+ # allocated_provisioned_concurrent_executions: 100,
2524
+ # available_provisioned_concurrent_executions: 100,
2525
+ # last_modified: Time.parse("2019-12-31T20:28:49+0000"),
2526
+ # requested_provisioned_concurrent_executions: 100,
2527
+ # status: "READY",
2528
+ # }
2529
+ #
2530
+ # @example Example: To view a provisioned concurrency configuration
2531
+ #
2532
+ # # The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified
2533
+ # # function.
2534
+ #
2535
+ # resp = client.get_provisioned_concurrency_config({
2536
+ # function_name: "my-function",
2537
+ # qualifier: "BLUE",
2538
+ # })
2539
+ #
2540
+ # resp.to_h outputs the following:
2541
+ # {
2542
+ # allocated_provisioned_concurrent_executions: 100,
2543
+ # available_provisioned_concurrent_executions: 100,
2544
+ # last_modified: Time.parse("2019-12-31T20:28:49+0000"),
2545
+ # requested_provisioned_concurrent_executions: 100,
2546
+ # status: "READY",
2547
+ # }
2548
+ #
2243
2549
  # @example Request syntax with placeholder values
2244
2550
  #
2245
2551
  # resp = client.get_provisioned_concurrency_config({
@@ -2301,7 +2607,7 @@ module Aws::Lambda
2301
2607
  # your HTTP client, SDK, firewall, proxy, or operating system to allow
2302
2608
  # for long connections with timeout or keep-alive settings.
2303
2609
  #
2304
- # This operation requires permission for the `lambda:InvokeFunction`
2610
+ # This operation requires permission for the [lambda:InvokeFunction][8]
2305
2611
  # action.
2306
2612
  #
2307
2613
  #
@@ -2313,6 +2619,7 @@ module Aws::Lambda
2313
2619
  # [5]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html
2314
2620
  # [6]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq
2315
2621
  # [7]: https://docs.aws.amazon.com/lambda/latest/dg/limits.html
2622
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html
2316
2623
  #
2317
2624
  # @option params [required, String] :function_name
2318
2625
  # The name of the Lambda function, version, or alias.
@@ -2371,23 +2678,35 @@ module Aws::Lambda
2371
2678
  #
2372
2679
  # @example Example: To invoke a Lambda function
2373
2680
  #
2374
- # # This operation invokes a Lambda function
2681
+ # # The following example invokes version 1 of a function named my-function with an empty event payload.
2682
+ #
2683
+ # resp = client.invoke({
2684
+ # function_name: "my-function",
2685
+ # payload: "{}",
2686
+ # qualifier: "1",
2687
+ # })
2688
+ #
2689
+ # resp.to_h outputs the following:
2690
+ # {
2691
+ # payload: "200 SUCCESS",
2692
+ # status_code: 200,
2693
+ # }
2694
+ #
2695
+ # @example Example: To invoke a Lambda function asynchronously
2696
+ #
2697
+ # # The following example invokes version 1 of a function named my-function asynchronously.
2375
2698
  #
2376
2699
  # resp = client.invoke({
2377
- # client_context: "MyApp",
2378
- # function_name: "MyFunction",
2700
+ # function_name: "my-function",
2379
2701
  # invocation_type: "Event",
2380
- # log_type: "Tail",
2381
- # payload: "fileb://file-path/input.json",
2702
+ # payload: "{}",
2382
2703
  # qualifier: "1",
2383
2704
  # })
2384
2705
  #
2385
2706
  # resp.to_h outputs the following:
2386
2707
  # {
2387
- # function_error: "",
2388
- # log_result: "",
2389
- # payload: "?",
2390
- # status_code: 123,
2708
+ # payload: "",
2709
+ # status_code: 202,
2391
2710
  # }
2392
2711
  #
2393
2712
  # @example Request syntax with placeholder values
@@ -2447,16 +2766,16 @@ module Aws::Lambda
2447
2766
  #
2448
2767
  # @example Example: To invoke a Lambda function asynchronously
2449
2768
  #
2450
- # # This operation invokes a Lambda function asynchronously
2769
+ # # The following example invokes a Lambda function asynchronously
2451
2770
  #
2452
2771
  # resp = client.invoke_async({
2453
- # function_name: "myFunction",
2454
- # invoke_args: "fileb://file-path/input.json",
2772
+ # function_name: "my-function",
2773
+ # invoke_args: "{}",
2455
2774
  # })
2456
2775
  #
2457
2776
  # resp.to_h outputs the following:
2458
2777
  # {
2459
- # status: 123,
2778
+ # status: 202,
2460
2779
  # }
2461
2780
  #
2462
2781
  # @example Request syntax with placeholder values
@@ -2519,22 +2838,37 @@ module Aws::Lambda
2519
2838
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2520
2839
  #
2521
2840
  #
2522
- # @example Example: To retrieve a Lambda function aliases
2841
+ # @example Example: To list a function's aliases
2523
2842
  #
2524
- # # This operation retrieves a Lambda function's aliases
2843
+ # # The following example returns a list of aliases for a function named my-function.
2525
2844
  #
2526
2845
  # resp = client.list_aliases({
2527
- # function_name: "myFunction",
2528
- # function_version: "1",
2529
- # marker: "",
2530
- # max_items: 123,
2846
+ # function_name: "my-function",
2531
2847
  # })
2532
2848
  #
2533
2849
  # resp.to_h outputs the following:
2534
2850
  # {
2535
2851
  # aliases: [
2852
+ # {
2853
+ # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BETA",
2854
+ # description: "Production environment BLUE.",
2855
+ # function_version: "2",
2856
+ # name: "BLUE",
2857
+ # revision_id: "a410117f-xmpl-494e-8035-7e204bb7933b",
2858
+ # routing_config: {
2859
+ # additional_version_weights: {
2860
+ # "1" => 0.7,
2861
+ # },
2862
+ # },
2863
+ # },
2864
+ # {
2865
+ # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:LIVE",
2866
+ # description: "Production environment GREEN.",
2867
+ # function_version: "1",
2868
+ # name: "GREEN",
2869
+ # revision_id: "21d40116-xmpl-40ba-9360-3ea284da1bb5",
2870
+ # },
2536
2871
  # ],
2537
- # next_marker: "",
2538
2872
  # }
2539
2873
  #
2540
2874
  # @example Request syntax with placeholder values
@@ -2611,6 +2945,30 @@ module Aws::Lambda
2611
2945
  #
2612
2946
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2613
2947
  #
2948
+ #
2949
+ # @example Example: To list the event source mappings for a function
2950
+ #
2951
+ # # The following example returns a list of the event source mappings for a function named my-function.
2952
+ #
2953
+ # resp = client.list_event_source_mappings({
2954
+ # function_name: "my-function",
2955
+ # })
2956
+ #
2957
+ # resp.to_h outputs the following:
2958
+ # {
2959
+ # event_source_mappings: [
2960
+ # {
2961
+ # batch_size: 5,
2962
+ # event_source_arn: "arn:aws:sqs:us-west-2:123456789012:mySQSqueue",
2963
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
2964
+ # last_modified: Time.parse(1569284520.333),
2965
+ # state: "Enabled",
2966
+ # state_transition_reason: "USER_INITIATED",
2967
+ # uuid: "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
2968
+ # },
2969
+ # ],
2970
+ # }
2971
+ #
2614
2972
  # @example Request syntax with placeholder values
2615
2973
  #
2616
2974
  # resp = client.list_event_source_mappings({
@@ -2684,6 +3042,33 @@ module Aws::Lambda
2684
3042
  #
2685
3043
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2686
3044
  #
3045
+ #
3046
+ # @example Example: To view a list of asynchronous invocation configurations
3047
+ #
3048
+ # # The following example returns a list of asynchronous invocation configurations for a function named my-function.
3049
+ #
3050
+ # resp = client.list_function_event_invoke_configs({
3051
+ # function_name: "my-function",
3052
+ # })
3053
+ #
3054
+ # resp.to_h outputs the following:
3055
+ # {
3056
+ # function_event_invoke_configs: [
3057
+ # {
3058
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:GREEN",
3059
+ # last_modified: Time.parse(1577824406.719),
3060
+ # maximum_event_age_in_seconds: 1800,
3061
+ # maximum_retry_attempts: 2,
3062
+ # },
3063
+ # {
3064
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
3065
+ # last_modified: Time.parse(1577824396.653),
3066
+ # maximum_event_age_in_seconds: 3600,
3067
+ # maximum_retry_attempts: 0,
3068
+ # },
3069
+ # ],
3070
+ # }
3071
+ #
2687
3072
  # @example Request syntax with placeholder values
2688
3073
  #
2689
3074
  # resp = client.list_function_event_invoke_configs({
@@ -2744,18 +3129,59 @@ module Aws::Lambda
2744
3129
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2745
3130
  #
2746
3131
  #
2747
- # @example Example: To retrieve a list of Lambda functions
3132
+ # @example Example: To get a list of Lambda functions
2748
3133
  #
2749
- # # This operation retrieves a Lambda functions
3134
+ # # This operation returns a list of Lambda functions.
2750
3135
  #
2751
3136
  # resp = client.list_functions({
2752
- # marker: "",
2753
- # max_items: 25,
2754
3137
  # })
2755
3138
  #
2756
3139
  # resp.to_h outputs the following:
2757
3140
  # {
2758
3141
  # functions: [
3142
+ # {
3143
+ # code_sha_256: "dBG9m8SGdmlEjw/JYXlhhvCrAv5TxvXsbL/RMr0fT/I=",
3144
+ # code_size: 294,
3145
+ # description: "",
3146
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:helloworld",
3147
+ # function_name: "helloworld",
3148
+ # handler: "helloworld.handler",
3149
+ # last_modified: Time.parse("2019-09-23T18:32:33.857+0000"),
3150
+ # memory_size: 128,
3151
+ # revision_id: "1718e831-badf-4253-9518-d0644210af7b",
3152
+ # role: "arn:aws:iam::123456789012:role/service-role/MyTestFunction-role-zgur6bf4",
3153
+ # runtime: "nodejs10.x",
3154
+ # timeout: 3,
3155
+ # tracing_config: {
3156
+ # mode: "PassThrough",
3157
+ # },
3158
+ # version: "$LATEST",
3159
+ # },
3160
+ # {
3161
+ # code_sha_256: "sU0cJ2/hOZevwV/lTxCuQqK3gDZP3i8gUoqUUVRmY6E=",
3162
+ # code_size: 266,
3163
+ # description: "",
3164
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
3165
+ # function_name: "my-function",
3166
+ # handler: "index.handler",
3167
+ # last_modified: Time.parse("2019-10-01T16:47:28.490+0000"),
3168
+ # memory_size: 256,
3169
+ # revision_id: "93017fc9-59cb-41dc-901b-4845ce4bf668",
3170
+ # role: "arn:aws:iam::123456789012:role/service-role/helloWorldPython-role-uy3l9qyq",
3171
+ # runtime: "nodejs10.x",
3172
+ # timeout: 3,
3173
+ # tracing_config: {
3174
+ # mode: "PassThrough",
3175
+ # },
3176
+ # version: "$LATEST",
3177
+ # vpc_config: {
3178
+ # security_group_ids: [
3179
+ # ],
3180
+ # subnet_ids: [
3181
+ # ],
3182
+ # vpc_id: "",
3183
+ # },
3184
+ # },
2759
3185
  # ],
2760
3186
  # next_marker: "",
2761
3187
  # }
@@ -2847,6 +3273,39 @@ module Aws::Lambda
2847
3273
  #
2848
3274
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2849
3275
  #
3276
+ #
3277
+ # @example Example: To list versions of a layer
3278
+ #
3279
+ # # The following example displays information about the versions for the layer named blank-java-lib
3280
+ #
3281
+ # resp = client.list_layer_versions({
3282
+ # layer_name: "blank-java-lib",
3283
+ # })
3284
+ #
3285
+ # resp.to_h outputs the following:
3286
+ # {
3287
+ # layer_versions: [
3288
+ # {
3289
+ # compatible_runtimes: [
3290
+ # "java8",
3291
+ # ],
3292
+ # created_date: Time.parse("2020-03-18T23:38:42.284+0000"),
3293
+ # description: "Dependencies for the blank-java sample app.",
3294
+ # layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-java-lib:7",
3295
+ # version: 7,
3296
+ # },
3297
+ # {
3298
+ # compatible_runtimes: [
3299
+ # "java8",
3300
+ # ],
3301
+ # created_date: Time.parse("2020-03-17T07:24:21.960+0000"),
3302
+ # description: "Dependencies for the blank-java sample app.",
3303
+ # layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-java-lib:6",
3304
+ # version: 6,
3305
+ # },
3306
+ # ],
3307
+ # }
3308
+ #
2850
3309
  # @example Request syntax with placeholder values
2851
3310
  #
2852
3311
  # resp = client.list_layer_versions({
@@ -2902,6 +3361,35 @@ module Aws::Lambda
2902
3361
  #
2903
3362
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2904
3363
  #
3364
+ #
3365
+ # @example Example: To list the layers that are compatible with your function's runtime
3366
+ #
3367
+ # # The following example returns information about layers that are compatible with the Python 3.7 runtime.
3368
+ #
3369
+ # resp = client.list_layers({
3370
+ # compatible_runtime: "python3.7",
3371
+ # })
3372
+ #
3373
+ # resp.to_h outputs the following:
3374
+ # {
3375
+ # layers: [
3376
+ # {
3377
+ # latest_matching_version: {
3378
+ # compatible_runtimes: [
3379
+ # "python3.6",
3380
+ # "python3.7",
3381
+ # ],
3382
+ # created_date: Time.parse("2018-11-15T00:37:46.592+0000"),
3383
+ # description: "My layer",
3384
+ # layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer:2",
3385
+ # version: 2,
3386
+ # },
3387
+ # layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer",
3388
+ # layer_name: "my-layer",
3389
+ # },
3390
+ # ],
3391
+ # }
3392
+ #
2905
3393
  # @example Request syntax with placeholder values
2906
3394
  #
2907
3395
  # resp = client.list_layers({
@@ -2965,6 +3453,37 @@ module Aws::Lambda
2965
3453
  #
2966
3454
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2967
3455
  #
3456
+ #
3457
+ # @example Example: To get a list of provisioned concurrency configurations
3458
+ #
3459
+ # # The following example returns a list of provisioned concurrency configurations for a function named my-function.
3460
+ #
3461
+ # resp = client.list_provisioned_concurrency_configs({
3462
+ # function_name: "my-function",
3463
+ # })
3464
+ #
3465
+ # resp.to_h outputs the following:
3466
+ # {
3467
+ # provisioned_concurrency_configs: [
3468
+ # {
3469
+ # allocated_provisioned_concurrent_executions: 100,
3470
+ # available_provisioned_concurrent_executions: 100,
3471
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:GREEN",
3472
+ # last_modified: Time.parse("2019-12-31T20:29:00+0000"),
3473
+ # requested_provisioned_concurrent_executions: 100,
3474
+ # status: "READY",
3475
+ # },
3476
+ # {
3477
+ # allocated_provisioned_concurrent_executions: 100,
3478
+ # available_provisioned_concurrent_executions: 100,
3479
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
3480
+ # last_modified: Time.parse("2019-12-31T20:28:49+0000"),
3481
+ # requested_provisioned_concurrent_executions: 100,
3482
+ # status: "READY",
3483
+ # },
3484
+ # ],
3485
+ # }
3486
+ #
2968
3487
  # @example Request syntax with placeholder values
2969
3488
  #
2970
3489
  # resp = client.list_provisioned_concurrency_configs({
@@ -3008,6 +3527,23 @@ module Aws::Lambda
3008
3527
  #
3009
3528
  # * {Types::ListTagsResponse#tags #tags} => Hash<String,String>
3010
3529
  #
3530
+ #
3531
+ # @example Example: To retrieve the list of tags for a Lambda function
3532
+ #
3533
+ # # The following example displays the tags attached to the my-function Lambda function.
3534
+ #
3535
+ # resp = client.list_tags({
3536
+ # resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
3537
+ # })
3538
+ #
3539
+ # resp.to_h outputs the following:
3540
+ # {
3541
+ # tags: {
3542
+ # "Category" => "Web Tools",
3543
+ # "Department" => "Sales",
3544
+ # },
3545
+ # }
3546
+ #
3011
3547
  # @example Request syntax with placeholder values
3012
3548
  #
3013
3549
  # resp = client.list_tags({
@@ -3065,20 +3601,67 @@ module Aws::Lambda
3065
3601
  # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3066
3602
  #
3067
3603
  #
3068
- # @example Example: To retrieve a list of Lambda function versions
3604
+ # @example Example: To list versions of a function
3069
3605
  #
3070
- # # This operation retrieves a Lambda function versions
3606
+ # # The following example returns a list of versions of a function named my-function
3071
3607
  #
3072
3608
  # resp = client.list_versions_by_function({
3073
- # function_name: "myFunction",
3074
- # marker: "",
3075
- # max_items: 25,
3609
+ # function_name: "my-function",
3076
3610
  # })
3077
3611
  #
3078
3612
  # resp.to_h outputs the following:
3079
3613
  # {
3080
- # next_marker: "",
3081
3614
  # versions: [
3615
+ # {
3616
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
3617
+ # code_size: 5797206,
3618
+ # description: "Process image objects from Amazon S3.",
3619
+ # environment: {
3620
+ # variables: {
3621
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
3622
+ # "PREFIX" => "inbound",
3623
+ # },
3624
+ # },
3625
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
3626
+ # function_name: "my-function",
3627
+ # handler: "index.handler",
3628
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
3629
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
3630
+ # memory_size: 256,
3631
+ # revision_id: "850ca006-2d98-4ff4-86db-8766e9d32fe9",
3632
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
3633
+ # runtime: "nodejs12.x",
3634
+ # timeout: 15,
3635
+ # tracing_config: {
3636
+ # mode: "Active",
3637
+ # },
3638
+ # version: "$LATEST",
3639
+ # },
3640
+ # {
3641
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
3642
+ # code_size: 5797206,
3643
+ # description: "Process image objects from Amazon S3.",
3644
+ # environment: {
3645
+ # variables: {
3646
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
3647
+ # "PREFIX" => "inbound",
3648
+ # },
3649
+ # },
3650
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
3651
+ # function_name: "my-function",
3652
+ # handler: "index.handler",
3653
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
3654
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
3655
+ # memory_size: 256,
3656
+ # revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
3657
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
3658
+ # runtime: "nodejs12.x",
3659
+ # timeout: 5,
3660
+ # tracing_config: {
3661
+ # mode: "Active",
3662
+ # },
3663
+ # version: "1",
3664
+ # },
3082
3665
  # ],
3083
3666
  # }
3084
3667
  #
@@ -3192,6 +3775,45 @@ module Aws::Lambda
3192
3775
  # * {Types::PublishLayerVersionResponse#compatible_runtimes #compatible_runtimes} => Array<String>
3193
3776
  # * {Types::PublishLayerVersionResponse#license_info #license_info} => String
3194
3777
  #
3778
+ #
3779
+ # @example Example: To create a Lambda layer version
3780
+ #
3781
+ # # The following example creates a new Python library layer version. The command retrieves the layer content a file named
3782
+ # # layer.zip in the specified S3 bucket.
3783
+ #
3784
+ # resp = client.publish_layer_version({
3785
+ # compatible_runtimes: [
3786
+ # "python3.6",
3787
+ # "python3.7",
3788
+ # ],
3789
+ # content: {
3790
+ # s3_bucket: "lambda-layers-us-west-2-123456789012",
3791
+ # s3_key: "layer.zip",
3792
+ # },
3793
+ # description: "My Python layer",
3794
+ # layer_name: "my-layer",
3795
+ # license_info: "MIT",
3796
+ # })
3797
+ #
3798
+ # resp.to_h outputs the following:
3799
+ # {
3800
+ # compatible_runtimes: [
3801
+ # "python3.6",
3802
+ # "python3.7",
3803
+ # ],
3804
+ # content: {
3805
+ # code_sha_256: "tv9jJO+rPbXUUXuRKi7CwHzKtLDkDRJLB3cC3Z/ouXo=",
3806
+ # code_size: 169,
3807
+ # location: "https://awslambda-us-west-2-layers.s3.us-west-2.amazonaws.com/snapshots/123456789012/my-layer-4aaa2fbb-ff77-4b0a-ad92-5b78a716a96a?versionId=27iWyA73cCAYqyH...",
3808
+ # },
3809
+ # created_date: Time.parse("2018-11-14T23:03:52.894+0000"),
3810
+ # description: "My Python layer",
3811
+ # layer_arn: "arn:aws:lambda:us-west-2:123456789012:layer:my-layer",
3812
+ # layer_version_arn: "arn:aws:lambda:us-west-2:123456789012:layer:my-layer:1",
3813
+ # license_info: "MIT",
3814
+ # version: 1,
3815
+ # }
3816
+ #
3195
3817
  # @example Request syntax with placeholder values
3196
3818
  #
3197
3819
  # resp = client.publish_layer_version({
@@ -3319,20 +3941,31 @@ module Aws::Lambda
3319
3941
  #
3320
3942
  # resp.to_h outputs the following:
3321
3943
  # {
3322
- # code_sha_256: "",
3323
- # code_size: 123,
3324
- # description: "",
3325
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
3326
- # function_name: "myFunction",
3944
+ # code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
3945
+ # code_size: 5797206,
3946
+ # description: "Process image objects from Amazon S3.",
3947
+ # environment: {
3948
+ # variables: {
3949
+ # "BUCKET" => "my-bucket-1xpuxmplzrlbh",
3950
+ # "PREFIX" => "inbound",
3951
+ # },
3952
+ # },
3953
+ # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
3954
+ # function_name: "my-function",
3327
3955
  # handler: "index.handler",
3328
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
3329
- # memory_size: 128,
3330
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
3331
- # runtime: "python2.7",
3332
- # timeout: 123,
3333
- # version: "1",
3334
- # vpc_config: {
3956
+ # kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
3957
+ # last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
3958
+ # last_update_status: "Successful",
3959
+ # memory_size: 256,
3960
+ # revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
3961
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
3962
+ # runtime: "nodejs12.x",
3963
+ # state: "Active",
3964
+ # timeout: 5,
3965
+ # tracing_config: {
3966
+ # mode: "Active",
3335
3967
  # },
3968
+ # version: "1",
3336
3969
  # }
3337
3970
  #
3338
3971
  # @example Request syntax with placeholder values
@@ -3432,6 +4065,21 @@ module Aws::Lambda
3432
4065
  #
3433
4066
  # * {Types::Concurrency#reserved_concurrent_executions #reserved_concurrent_executions} => Integer
3434
4067
  #
4068
+ #
4069
+ # @example Example: To configure a reserved concurrency limit for a function
4070
+ #
4071
+ # # The following example configures 100 reserved concurrent executions for the my-function function.
4072
+ #
4073
+ # resp = client.put_function_concurrency({
4074
+ # function_name: "my-function",
4075
+ # reserved_concurrent_executions: 100,
4076
+ # })
4077
+ #
4078
+ # resp.to_h outputs the following:
4079
+ # {
4080
+ # reserved_concurrent_executions: 100,
4081
+ # }
4082
+ #
3435
4083
  # @example Request syntax with placeholder values
3436
4084
  #
3437
4085
  # resp = client.put_function_concurrency({
@@ -3526,6 +4174,31 @@ module Aws::Lambda
3526
4174
  # * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
3527
4175
  # * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
3528
4176
  #
4177
+ #
4178
+ # @example Example: To configure error handling for asynchronous invocation
4179
+ #
4180
+ # # The following example sets a maximum event age of one hour and disables retries for the specified function.
4181
+ #
4182
+ # resp = client.put_function_event_invoke_config({
4183
+ # function_name: "my-function",
4184
+ # maximum_event_age_in_seconds: 3600,
4185
+ # maximum_retry_attempts: 0,
4186
+ # })
4187
+ #
4188
+ # resp.to_h outputs the following:
4189
+ # {
4190
+ # destination_config: {
4191
+ # on_failure: {
4192
+ # },
4193
+ # on_success: {
4194
+ # },
4195
+ # },
4196
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
4197
+ # last_modified: Time.parse("${timestamp}"),
4198
+ # maximum_event_age_in_seconds: 3600,
4199
+ # maximum_retry_attempts: 0,
4200
+ # }
4201
+ #
3529
4202
  # @example Request syntax with placeholder values
3530
4203
  #
3531
4204
  # resp = client.put_function_event_invoke_config({
@@ -3595,6 +4268,25 @@ module Aws::Lambda
3595
4268
  # * {Types::PutProvisionedConcurrencyConfigResponse#status_reason #status_reason} => String
3596
4269
  # * {Types::PutProvisionedConcurrencyConfigResponse#last_modified #last_modified} => Time
3597
4270
  #
4271
+ #
4272
+ # @example Example: To allocate provisioned concurrency
4273
+ #
4274
+ # # The following example allocates 100 provisioned concurrency for the BLUE alias of the specified function.
4275
+ #
4276
+ # resp = client.put_provisioned_concurrency_config({
4277
+ # function_name: "my-function",
4278
+ # provisioned_concurrent_executions: 100,
4279
+ # qualifier: "BLUE",
4280
+ # })
4281
+ #
4282
+ # resp.to_h outputs the following:
4283
+ # {
4284
+ # allocated_provisioned_concurrent_executions: 0,
4285
+ # last_modified: Time.parse("2019-11-21T19:32:12+0000"),
4286
+ # requested_provisioned_concurrent_executions: 100,
4287
+ # status: "IN_PROGRESS",
4288
+ # }
4289
+ #
3598
4290
  # @example Request syntax with placeholder values
3599
4291
  #
3600
4292
  # resp = client.put_provisioned_concurrency_config({
@@ -3645,6 +4337,17 @@ module Aws::Lambda
3645
4337
  #
3646
4338
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3647
4339
  #
4340
+ #
4341
+ # @example Example: To delete layer-version permissions
4342
+ #
4343
+ # # The following example deletes permission for an account to configure a layer version.
4344
+ #
4345
+ # resp = client.remove_layer_version_permission({
4346
+ # layer_name: "my-layer",
4347
+ # statement_id: "xaccount",
4348
+ # version_number: 1,
4349
+ # })
4350
+ #
3648
4351
  # @example Request syntax with placeholder values
3649
4352
  #
3650
4353
  # resp = client.remove_layer_version_permission({
@@ -3701,12 +4404,13 @@ module Aws::Lambda
3701
4404
  #
3702
4405
  # @example Example: To remove a Lambda function's permissions
3703
4406
  #
3704
- # # This operation removes a Lambda function's permissions
4407
+ # # The following example removes a permissions statement named xaccount from the PROD alias of a function named
4408
+ # # my-function.
3705
4409
  #
3706
4410
  # resp = client.remove_permission({
3707
- # function_name: "myFunction",
3708
- # qualifier: "1",
3709
- # statement_id: "role-statement-id",
4411
+ # function_name: "my-function",
4412
+ # qualifier: "PROD",
4413
+ # statement_id: "xaccount",
3710
4414
  # })
3711
4415
  #
3712
4416
  # @example Request syntax with placeholder values
@@ -3741,6 +4445,19 @@ module Aws::Lambda
3741
4445
  #
3742
4446
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3743
4447
  #
4448
+ #
4449
+ # @example Example: To add tags to an existing Lambda function
4450
+ #
4451
+ # # The following example adds a tag with the key name DEPARTMENT and a value of 'Department A' to the specified Lambda
4452
+ # # function.
4453
+ #
4454
+ # resp = client.tag_resource({
4455
+ # resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
4456
+ # tags: {
4457
+ # "DEPARTMENT" => "Department A",
4458
+ # },
4459
+ # })
4460
+ #
3744
4461
  # @example Request syntax with placeholder values
3745
4462
  #
3746
4463
  # resp = client.tag_resource({
@@ -3773,6 +4490,18 @@ module Aws::Lambda
3773
4490
  #
3774
4491
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3775
4492
  #
4493
+ #
4494
+ # @example Example: To remove tags from an existing Lambda function
4495
+ #
4496
+ # # The following example removes the tag with the key name DEPARTMENT tag from the my-function Lambda function.
4497
+ #
4498
+ # resp = client.untag_resource({
4499
+ # resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
4500
+ # tag_keys: [
4501
+ # "DEPARTMENT",
4502
+ # ],
4503
+ # })
4504
+ #
3776
4505
  # @example Request syntax with placeholder values
3777
4506
  #
3778
4507
  # resp = client.untag_resource({
@@ -3841,23 +4570,33 @@ module Aws::Lambda
3841
4570
  # * {Types::AliasConfiguration#revision_id #revision_id} => String
3842
4571
  #
3843
4572
  #
3844
- # @example Example: To update a Lambda function alias
4573
+ # @example Example: To update a function alias
3845
4574
  #
3846
- # # This operation updates a Lambda function alias
4575
+ # # The following example updates the alias named BLUE to send 30% of traffic to version 2 and 70% to version 1.
3847
4576
  #
3848
4577
  # resp = client.update_alias({
3849
- # description: "",
3850
- # function_name: "myFunction",
3851
- # function_version: "1",
3852
- # name: "functionAlias",
4578
+ # function_name: "my-function",
4579
+ # function_version: "2",
4580
+ # name: "BLUE",
4581
+ # routing_config: {
4582
+ # additional_version_weights: {
4583
+ # "1" => 0.7,
4584
+ # },
4585
+ # },
3853
4586
  # })
3854
4587
  #
3855
4588
  # resp.to_h outputs the following:
3856
4589
  # {
3857
- # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:functionAlias",
3858
- # description: "",
3859
- # function_version: "1",
3860
- # name: "functionAlias",
4590
+ # alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BLUE",
4591
+ # description: "Production environment BLUE.",
4592
+ # function_version: "2",
4593
+ # name: "BLUE",
4594
+ # revision_id: "594f41fb-xmpl-4c20-95c7-6ca5f2a92c93",
4595
+ # routing_config: {
4596
+ # additional_version_weights: {
4597
+ # "1" => 0.7,
4598
+ # },
4599
+ # },
3861
4600
  # }
3862
4601
  #
3863
4602
  # @example Request syntax with placeholder values
@@ -4144,33 +4883,33 @@ module Aws::Lambda
4144
4883
  #
4145
4884
  # @example Example: To update a Lambda function's code
4146
4885
  #
4147
- # # This operation updates a Lambda function's code
4886
+ # # The following example replaces the code of the unpublished ($LATEST) version of a function named my-function with the
4887
+ # # contents of the specified zip file in Amazon S3.
4148
4888
  #
4149
4889
  # resp = client.update_function_code({
4150
- # function_name: "myFunction",
4151
- # publish: true,
4152
- # s3_bucket: "myBucket",
4153
- # s3_key: "myKey",
4154
- # s3_object_version: "1",
4155
- # zip_file: "fileb://file-path/file.zip",
4890
+ # function_name: "my-function",
4891
+ # s3_bucket: "my-bucket-1xpuxmplzrlbh",
4892
+ # s3_key: "function.zip",
4156
4893
  # })
4157
4894
  #
4158
4895
  # resp.to_h outputs the following:
4159
4896
  # {
4160
- # code_sha_256: "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
4161
- # code_size: 123,
4897
+ # code_sha_256: "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
4898
+ # code_size: 308,
4162
4899
  # description: "",
4163
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
4164
- # function_name: "myFunction",
4900
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
4901
+ # function_name: "my-function",
4165
4902
  # handler: "index.handler",
4166
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
4903
+ # last_modified: Time.parse("2019-08-14T22:26:11.234+0000"),
4167
4904
  # memory_size: 128,
4168
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
4169
- # runtime: "python2.7",
4170
- # timeout: 123,
4171
- # version: "1",
4172
- # vpc_config: {
4905
+ # revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
4906
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
4907
+ # runtime: "nodejs12.x",
4908
+ # timeout: 3,
4909
+ # tracing_config: {
4910
+ # mode: "PassThrough",
4173
4911
  # },
4912
+ # version: "$LATEST",
4174
4913
  # }
4175
4914
  #
4176
4915
  # @example Request syntax with placeholder values
@@ -4382,36 +5121,32 @@ module Aws::Lambda
4382
5121
  #
4383
5122
  # @example Example: To update a Lambda function's configuration
4384
5123
  #
4385
- # # This operation updates a Lambda function's configuration
5124
+ # # The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named
5125
+ # # my-function.
4386
5126
  #
4387
5127
  # resp = client.update_function_configuration({
4388
- # description: "",
4389
- # function_name: "myFunction",
4390
- # handler: "index.handler",
4391
- # memory_size: 128,
4392
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
4393
- # runtime: "python2.7",
4394
- # timeout: 123,
4395
- # vpc_config: {
4396
- # },
5128
+ # function_name: "my-function",
5129
+ # memory_size: 256,
4397
5130
  # })
4398
5131
  #
4399
5132
  # resp.to_h outputs the following:
4400
5133
  # {
4401
- # code_sha_256: "LQT+0DHxxxxcfwLyQjzoEFKZtdqQjHXanlSdfXBlEW0VA=",
4402
- # code_size: 123,
5134
+ # code_sha_256: "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
5135
+ # code_size: 308,
4403
5136
  # description: "",
4404
- # function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
4405
- # function_name: "myFunction",
5137
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
5138
+ # function_name: "my-function",
4406
5139
  # handler: "index.handler",
4407
- # last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
4408
- # memory_size: 128,
4409
- # role: "arn:aws:iam::123456789012:role/lambda_basic_execution",
4410
- # runtime: "python2.7",
4411
- # timeout: 123,
4412
- # version: "1",
4413
- # vpc_config: {
5140
+ # last_modified: Time.parse("2019-08-14T22:26:11.234+0000"),
5141
+ # memory_size: 256,
5142
+ # revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
5143
+ # role: "arn:aws:iam::123456789012:role/lambda-role",
5144
+ # runtime: "nodejs12.x",
5145
+ # timeout: 3,
5146
+ # tracing_config: {
5147
+ # mode: "PassThrough",
4414
5148
  # },
5149
+ # version: "$LATEST",
4415
5150
  # }
4416
5151
  #
4417
5152
  # @example Request syntax with placeholder values
@@ -4547,6 +5282,36 @@ module Aws::Lambda
4547
5282
  # * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
4548
5283
  # * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
4549
5284
  #
5285
+ #
5286
+ # @example Example: To update an asynchronous invocation configuration
5287
+ #
5288
+ # # The following example adds an on-failure destination to the existing asynchronous invocation configuration for a
5289
+ # # function named my-function.
5290
+ #
5291
+ # resp = client.update_function_event_invoke_config({
5292
+ # destination_config: {
5293
+ # on_failure: {
5294
+ # destination: "arn:aws:sqs:us-east-2:123456789012:destination",
5295
+ # },
5296
+ # },
5297
+ # function_name: "my-function",
5298
+ # })
5299
+ #
5300
+ # resp.to_h outputs the following:
5301
+ # {
5302
+ # destination_config: {
5303
+ # on_failure: {
5304
+ # destination: "arn:aws:sqs:us-east-2:123456789012:destination",
5305
+ # },
5306
+ # on_success: {
5307
+ # },
5308
+ # },
5309
+ # function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
5310
+ # last_modified: Time.parse(1573687896.493),
5311
+ # maximum_event_age_in_seconds: 3600,
5312
+ # maximum_retry_attempts: 0,
5313
+ # }
5314
+ #
4550
5315
  # @example Request syntax with placeholder values
4551
5316
  #
4552
5317
  # resp = client.update_function_event_invoke_config({
@@ -4595,7 +5360,7 @@ module Aws::Lambda
4595
5360
  params: params,
4596
5361
  config: config)
4597
5362
  context[:gem_name] = 'aws-sdk-lambda'
4598
- context[:gem_version] = '1.38.0'
5363
+ context[:gem_version] = '1.43.1'
4599
5364
  Seahorse::Client::Request.new(handlers, context)
4600
5365
  end
4601
5366