aws-sdk-lambda 1.130.0 → 1.132.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-lambda/client.rb +1564 -28
- data/lib/aws-sdk-lambda/client_api.rb +133 -3
- data/lib/aws-sdk-lambda/endpoints.rb +55 -0
- data/lib/aws-sdk-lambda/errors.rb +21 -0
- data/lib/aws-sdk-lambda/plugins/endpoints.rb +10 -0
- data/lib/aws-sdk-lambda/types.rb +249 -12
- data/lib/aws-sdk-lambda.rb +1 -1
- data/sig/client.rbs +62 -1
- data/sig/errors.rbs +4 -0
- data/sig/types.rbs +66 -0
- metadata +2 -2
@@ -501,6 +501,25 @@ module Aws::Lambda
|
|
501
501
|
# * {Types::AddLayerVersionPermissionResponse#statement #statement} => String
|
502
502
|
# * {Types::AddLayerVersionPermissionResponse#revision_id #revision_id} => String
|
503
503
|
#
|
504
|
+
#
|
505
|
+
# @example Example: To add permissions to a layer version
|
506
|
+
#
|
507
|
+
# # The following example grants permission for the account 223456789012 to use version 1 of a layer named my-layer.
|
508
|
+
#
|
509
|
+
# resp = client.add_layer_version_permission({
|
510
|
+
# action: "lambda:GetLayerVersion",
|
511
|
+
# layer_name: "my-layer",
|
512
|
+
# principal: "223456789012",
|
513
|
+
# statement_id: "xaccount",
|
514
|
+
# version_number: 1,
|
515
|
+
# })
|
516
|
+
#
|
517
|
+
# resp.to_h outputs the following:
|
518
|
+
# {
|
519
|
+
# revision_id: "35d87451-f796-4a3f-a618-95a3671b0a0c",
|
520
|
+
# 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\"}",
|
521
|
+
# }
|
522
|
+
#
|
504
523
|
# @example Request syntax with placeholder values
|
505
524
|
#
|
506
525
|
# resp = client.add_layer_version_permission({
|
@@ -527,13 +546,12 @@ module Aws::Lambda
|
|
527
546
|
req.send_request(options)
|
528
547
|
end
|
529
548
|
|
530
|
-
# Grants
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
# adding policies to version $LATEST.
|
549
|
+
# Grants a [principal][1] permission to use a function. You can apply
|
550
|
+
# the policy at the function level, or specify a qualifier to restrict
|
551
|
+
# access to a single version or alias. If you use a qualifier, the
|
552
|
+
# invoker must use the full Amazon Resource Name (ARN) of that version
|
553
|
+
# or alias to invoke the function. Note: Lambda does not support adding
|
554
|
+
# policies to version $LATEST.
|
537
555
|
#
|
538
556
|
# To grant permission to another account, specify the account ID as the
|
539
557
|
# `Principal`. To grant permission to an organization defined in
|
@@ -548,11 +566,12 @@ module Aws::Lambda
|
|
548
566
|
#
|
549
567
|
# This operation adds a statement to a resource-based permissions policy
|
550
568
|
# for the function. For more information about function policies, see
|
551
|
-
# [Using resource-based policies for Lambda][
|
569
|
+
# [Using resource-based policies for Lambda][2].
|
552
570
|
#
|
553
571
|
#
|
554
572
|
#
|
555
|
-
# [1]: https://docs.aws.amazon.com/
|
573
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying
|
574
|
+
# [2]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
|
556
575
|
#
|
557
576
|
# @option params [required, String] :function_name
|
558
577
|
# The name or ARN of the Lambda function, version, or alias.
|
@@ -580,10 +599,10 @@ module Aws::Lambda
|
|
580
599
|
# `lambda:InvokeFunction` or `lambda:GetFunction`.
|
581
600
|
#
|
582
601
|
# @option params [required, String] :principal
|
583
|
-
# The Amazon Web Servicesservice
|
584
|
-
# invokes the function. If you specify a service, use
|
585
|
-
# `SourceAccount` to limit who can invoke the function
|
586
|
-
# service.
|
602
|
+
# The Amazon Web Servicesservice, Amazon Web Services account, IAM user,
|
603
|
+
# or IAM role that invokes the function. If you specify a service, use
|
604
|
+
# `SourceArn` or `SourceAccount` to limit who can invoke the function
|
605
|
+
# through that service.
|
587
606
|
#
|
588
607
|
# @option params [String] :source_arn
|
589
608
|
# For Amazon Web Servicesservices, the ARN of the Amazon Web Services
|
@@ -632,6 +651,42 @@ module Aws::Lambda
|
|
632
651
|
#
|
633
652
|
# * {Types::AddPermissionResponse#statement #statement} => String
|
634
653
|
#
|
654
|
+
#
|
655
|
+
# @example Example: To grant Amazon S3 permission to invoke a function
|
656
|
+
#
|
657
|
+
# # The following example adds permission for Amazon S3 to invoke a Lambda function named my-function for notifications from
|
658
|
+
# # a bucket named my-bucket-1xpuxmplzrlbh in account 123456789012.
|
659
|
+
#
|
660
|
+
# resp = client.add_permission({
|
661
|
+
# action: "lambda:InvokeFunction",
|
662
|
+
# function_name: "my-function",
|
663
|
+
# principal: "s3.amazonaws.com",
|
664
|
+
# source_account: "123456789012",
|
665
|
+
# source_arn: "arn:aws:s3:::my-bucket-1xpuxmplzrlbh/*",
|
666
|
+
# statement_id: "s3",
|
667
|
+
# })
|
668
|
+
#
|
669
|
+
# resp.to_h outputs the following:
|
670
|
+
# {
|
671
|
+
# 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\"}}}",
|
672
|
+
# }
|
673
|
+
#
|
674
|
+
# @example Example: To grant another account permission to invoke a function
|
675
|
+
#
|
676
|
+
# # The following example adds permission for account 223456789012 invoke a Lambda function named my-function.
|
677
|
+
#
|
678
|
+
# resp = client.add_permission({
|
679
|
+
# action: "lambda:InvokeFunction",
|
680
|
+
# function_name: "my-function",
|
681
|
+
# principal: "223456789012",
|
682
|
+
# statement_id: "xaccount",
|
683
|
+
# })
|
684
|
+
#
|
685
|
+
# resp.to_h outputs the following:
|
686
|
+
# {
|
687
|
+
# 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\"}",
|
688
|
+
# }
|
689
|
+
#
|
635
690
|
# @example Request syntax with placeholder values
|
636
691
|
#
|
637
692
|
# resp = client.add_permission({
|
@@ -713,6 +768,27 @@ module Aws::Lambda
|
|
713
768
|
# * {Types::AliasConfiguration#routing_config #routing_config} => Types::AliasRoutingConfiguration
|
714
769
|
# * {Types::AliasConfiguration#revision_id #revision_id} => String
|
715
770
|
#
|
771
|
+
#
|
772
|
+
# @example Example: To create an alias for a Lambda function
|
773
|
+
#
|
774
|
+
# # The following example creates an alias named LIVE that points to version 1 of the my-function Lambda function.
|
775
|
+
#
|
776
|
+
# resp = client.create_alias({
|
777
|
+
# description: "alias for live version of function",
|
778
|
+
# function_name: "my-function",
|
779
|
+
# function_version: "1",
|
780
|
+
# name: "LIVE",
|
781
|
+
# })
|
782
|
+
#
|
783
|
+
# resp.to_h outputs the following:
|
784
|
+
# {
|
785
|
+
# alias_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:LIVE",
|
786
|
+
# description: "alias for live version of function",
|
787
|
+
# function_version: "1",
|
788
|
+
# name: "LIVE",
|
789
|
+
# revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
|
790
|
+
# }
|
791
|
+
#
|
716
792
|
# @example Request syntax with placeholder values
|
717
793
|
#
|
718
794
|
# resp = client.create_alias({
|
@@ -765,6 +841,9 @@ module Aws::Lambda
|
|
765
841
|
# The code signing policies define the actions to take if the validation
|
766
842
|
# checks fail.
|
767
843
|
#
|
844
|
+
# @option params [Hash<String,String>] :tags
|
845
|
+
# A list of tags to add to the code signing configuration.
|
846
|
+
#
|
768
847
|
# @return [Types::CreateCodeSigningConfigResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
769
848
|
#
|
770
849
|
# * {Types::CreateCodeSigningConfigResponse#code_signing_config #code_signing_config} => Types::CodeSigningConfig
|
@@ -779,6 +858,9 @@ module Aws::Lambda
|
|
779
858
|
# code_signing_policies: {
|
780
859
|
# untrusted_artifact_on_deployment: "Warn", # accepts Warn, Enforce
|
781
860
|
# },
|
861
|
+
# tags: {
|
862
|
+
# "TagKey" => "TagValue",
|
863
|
+
# },
|
782
864
|
# })
|
783
865
|
#
|
784
866
|
# @example Response structure
|
@@ -1003,6 +1085,9 @@ module Aws::Lambda
|
|
1003
1085
|
# set to infinite (-1), failed records are retried until the record
|
1004
1086
|
# expires.
|
1005
1087
|
#
|
1088
|
+
# @option params [Hash<String,String>] :tags
|
1089
|
+
# A list of tags to apply to the event source mapping.
|
1090
|
+
#
|
1006
1091
|
# @option params [Integer] :tumbling_window_in_seconds
|
1007
1092
|
# (Kinesis and DynamoDB Streams only) The duration in seconds of a
|
1008
1093
|
# processing window for DynamoDB and Kinesis Streams event sources. A
|
@@ -1086,6 +1171,29 @@ module Aws::Lambda
|
|
1086
1171
|
# * {Types::EventSourceMappingConfiguration#document_db_event_source_config #document_db_event_source_config} => Types::DocumentDBEventSourceConfig
|
1087
1172
|
# * {Types::EventSourceMappingConfiguration#kms_key_arn #kms_key_arn} => String
|
1088
1173
|
# * {Types::EventSourceMappingConfiguration#filter_criteria_error #filter_criteria_error} => Types::FilterCriteriaError
|
1174
|
+
# * {Types::EventSourceMappingConfiguration#event_source_mapping_arn #event_source_mapping_arn} => String
|
1175
|
+
#
|
1176
|
+
#
|
1177
|
+
# @example Example: To create a mapping between an event source and an AWS Lambda function
|
1178
|
+
#
|
1179
|
+
# # The following example creates a mapping between an SQS queue and the my-function Lambda function.
|
1180
|
+
#
|
1181
|
+
# resp = client.create_event_source_mapping({
|
1182
|
+
# batch_size: 5,
|
1183
|
+
# event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
|
1184
|
+
# function_name: "my-function",
|
1185
|
+
# })
|
1186
|
+
#
|
1187
|
+
# resp.to_h outputs the following:
|
1188
|
+
# {
|
1189
|
+
# batch_size: 5,
|
1190
|
+
# event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
|
1191
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
1192
|
+
# last_modified: Time.parse(1569284520.333),
|
1193
|
+
# state: "Creating",
|
1194
|
+
# state_transition_reason: "USER_INITIATED",
|
1195
|
+
# uuid: "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
|
1196
|
+
# }
|
1089
1197
|
#
|
1090
1198
|
# @example Request syntax with placeholder values
|
1091
1199
|
#
|
@@ -1116,6 +1224,9 @@ module Aws::Lambda
|
|
1116
1224
|
# maximum_record_age_in_seconds: 1,
|
1117
1225
|
# bisect_batch_on_function_error: false,
|
1118
1226
|
# maximum_retry_attempts: 1,
|
1227
|
+
# tags: {
|
1228
|
+
# "TagKey" => "TagValue",
|
1229
|
+
# },
|
1119
1230
|
# tumbling_window_in_seconds: 1,
|
1120
1231
|
# topics: ["Topic"],
|
1121
1232
|
# queues: ["Queue"],
|
@@ -1191,6 +1302,7 @@ module Aws::Lambda
|
|
1191
1302
|
# resp.kms_key_arn #=> String
|
1192
1303
|
# resp.filter_criteria_error.error_code #=> String
|
1193
1304
|
# resp.filter_criteria_error.message #=> String
|
1305
|
+
# resp.event_source_mapping_arn #=> String
|
1194
1306
|
#
|
1195
1307
|
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMapping AWS API Documentation
|
1196
1308
|
#
|
@@ -1498,6 +1610,69 @@ module Aws::Lambda
|
|
1498
1610
|
# * {Types::FunctionConfiguration#runtime_version_config #runtime_version_config} => Types::RuntimeVersionConfig
|
1499
1611
|
# * {Types::FunctionConfiguration#logging_config #logging_config} => Types::LoggingConfig
|
1500
1612
|
#
|
1613
|
+
#
|
1614
|
+
# @example Example: To create a function
|
1615
|
+
#
|
1616
|
+
# # The following example creates a function with a deployment package in Amazon S3 and enables X-Ray tracing and
|
1617
|
+
# # environment variable encryption.
|
1618
|
+
#
|
1619
|
+
# resp = client.create_function({
|
1620
|
+
# code: {
|
1621
|
+
# s3_bucket: "my-bucket-1xpuxmplzrlbh",
|
1622
|
+
# s3_key: "function.zip",
|
1623
|
+
# },
|
1624
|
+
# description: "Process image objects from Amazon S3.",
|
1625
|
+
# environment: {
|
1626
|
+
# variables: {
|
1627
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
1628
|
+
# "PREFIX" => "inbound",
|
1629
|
+
# },
|
1630
|
+
# },
|
1631
|
+
# function_name: "my-function",
|
1632
|
+
# handler: "index.handler",
|
1633
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
1634
|
+
# memory_size: 256,
|
1635
|
+
# publish: true,
|
1636
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
1637
|
+
# runtime: "nodejs12.x",
|
1638
|
+
# tags: {
|
1639
|
+
# "DEPARTMENT" => "Assets",
|
1640
|
+
# },
|
1641
|
+
# timeout: 15,
|
1642
|
+
# tracing_config: {
|
1643
|
+
# mode: "Active",
|
1644
|
+
# },
|
1645
|
+
# })
|
1646
|
+
#
|
1647
|
+
# resp.to_h outputs the following:
|
1648
|
+
# {
|
1649
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
1650
|
+
# code_size: 5797206,
|
1651
|
+
# description: "Process image objects from Amazon S3.",
|
1652
|
+
# environment: {
|
1653
|
+
# variables: {
|
1654
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
1655
|
+
# "PREFIX" => "inbound",
|
1656
|
+
# },
|
1657
|
+
# },
|
1658
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
1659
|
+
# function_name: "my-function",
|
1660
|
+
# handler: "index.handler",
|
1661
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
1662
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
1663
|
+
# last_update_status: "Successful",
|
1664
|
+
# memory_size: 256,
|
1665
|
+
# revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
|
1666
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
1667
|
+
# runtime: "nodejs12.x",
|
1668
|
+
# state: "Active",
|
1669
|
+
# timeout: 15,
|
1670
|
+
# tracing_config: {
|
1671
|
+
# mode: "Active",
|
1672
|
+
# },
|
1673
|
+
# version: "1",
|
1674
|
+
# }
|
1675
|
+
#
|
1501
1676
|
# @example Request syntax with placeholder values
|
1502
1677
|
#
|
1503
1678
|
# resp = client.create_function({
|
@@ -1778,6 +1953,16 @@ module Aws::Lambda
|
|
1778
1953
|
#
|
1779
1954
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1780
1955
|
#
|
1956
|
+
#
|
1957
|
+
# @example Example: To delete a Lambda function alias
|
1958
|
+
#
|
1959
|
+
# # The following example deletes an alias named BLUE from a function named my-function
|
1960
|
+
#
|
1961
|
+
# resp = client.delete_alias({
|
1962
|
+
# function_name: "my-function",
|
1963
|
+
# name: "BLUE",
|
1964
|
+
# })
|
1965
|
+
#
|
1781
1966
|
# @example Request syntax with placeholder values
|
1782
1967
|
#
|
1783
1968
|
# resp = client.delete_alias({
|
@@ -1861,6 +2046,27 @@ module Aws::Lambda
|
|
1861
2046
|
# * {Types::EventSourceMappingConfiguration#document_db_event_source_config #document_db_event_source_config} => Types::DocumentDBEventSourceConfig
|
1862
2047
|
# * {Types::EventSourceMappingConfiguration#kms_key_arn #kms_key_arn} => String
|
1863
2048
|
# * {Types::EventSourceMappingConfiguration#filter_criteria_error #filter_criteria_error} => Types::FilterCriteriaError
|
2049
|
+
# * {Types::EventSourceMappingConfiguration#event_source_mapping_arn #event_source_mapping_arn} => String
|
2050
|
+
#
|
2051
|
+
#
|
2052
|
+
# @example Example: To delete a Lambda function event source mapping
|
2053
|
+
#
|
2054
|
+
# # The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
|
2055
|
+
#
|
2056
|
+
# resp = client.delete_event_source_mapping({
|
2057
|
+
# uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
|
2058
|
+
# })
|
2059
|
+
#
|
2060
|
+
# resp.to_h outputs the following:
|
2061
|
+
# {
|
2062
|
+
# batch_size: 5,
|
2063
|
+
# event_source_arn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
|
2064
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
|
2065
|
+
# last_modified: Time.parse("${timestamp}"),
|
2066
|
+
# state: "Enabled",
|
2067
|
+
# state_transition_reason: "USER_INITIATED",
|
2068
|
+
# uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
|
2069
|
+
# }
|
1864
2070
|
#
|
1865
2071
|
# @example Request syntax with placeholder values
|
1866
2072
|
#
|
@@ -1911,6 +2117,7 @@ module Aws::Lambda
|
|
1911
2117
|
# resp.kms_key_arn #=> String
|
1912
2118
|
# resp.filter_criteria_error.error_code #=> String
|
1913
2119
|
# resp.filter_criteria_error.message #=> String
|
2120
|
+
# resp.event_source_mapping_arn #=> String
|
1914
2121
|
#
|
1915
2122
|
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping AWS API Documentation
|
1916
2123
|
#
|
@@ -1954,6 +2161,16 @@ module Aws::Lambda
|
|
1954
2161
|
#
|
1955
2162
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1956
2163
|
#
|
2164
|
+
#
|
2165
|
+
# @example Example: To delete a version of a Lambda function
|
2166
|
+
#
|
2167
|
+
# # The following example deletes version 1 of a Lambda function named my-function.
|
2168
|
+
#
|
2169
|
+
# resp = client.delete_function({
|
2170
|
+
# function_name: "my-function",
|
2171
|
+
# qualifier: "1",
|
2172
|
+
# })
|
2173
|
+
#
|
1957
2174
|
# @example Request syntax with placeholder values
|
1958
2175
|
#
|
1959
2176
|
# resp = client.delete_function({
|
@@ -2023,6 +2240,15 @@ module Aws::Lambda
|
|
2023
2240
|
#
|
2024
2241
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2025
2242
|
#
|
2243
|
+
#
|
2244
|
+
# @example Example: To remove the reserved concurrent execution limit from a function
|
2245
|
+
#
|
2246
|
+
# # The following example deletes the reserved concurrent execution limit from a function named my-function.
|
2247
|
+
#
|
2248
|
+
# resp = client.delete_function_concurrency({
|
2249
|
+
# function_name: "my-function",
|
2250
|
+
# })
|
2251
|
+
#
|
2026
2252
|
# @example Request syntax with placeholder values
|
2027
2253
|
#
|
2028
2254
|
# resp = client.delete_function_concurrency({
|
@@ -2066,6 +2292,17 @@ module Aws::Lambda
|
|
2066
2292
|
#
|
2067
2293
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2068
2294
|
#
|
2295
|
+
#
|
2296
|
+
# @example Example: To delete an asynchronous invocation configuration
|
2297
|
+
#
|
2298
|
+
# # The following example deletes the asynchronous invocation configuration for the GREEN alias of a function named
|
2299
|
+
# # my-function.
|
2300
|
+
#
|
2301
|
+
# resp = client.delete_function_event_invoke_config({
|
2302
|
+
# function_name: "my-function",
|
2303
|
+
# qualifier: "GREEN",
|
2304
|
+
# })
|
2305
|
+
#
|
2069
2306
|
# @example Request syntax with placeholder values
|
2070
2307
|
#
|
2071
2308
|
# resp = client.delete_function_event_invoke_config({
|
@@ -2138,6 +2375,16 @@ module Aws::Lambda
|
|
2138
2375
|
#
|
2139
2376
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2140
2377
|
#
|
2378
|
+
#
|
2379
|
+
# @example Example: To delete a version of a Lambda layer
|
2380
|
+
#
|
2381
|
+
# # The following example deletes version 2 of a layer named my-layer.
|
2382
|
+
#
|
2383
|
+
# resp = client.delete_layer_version({
|
2384
|
+
# layer_name: "my-layer",
|
2385
|
+
# version_number: 2,
|
2386
|
+
# })
|
2387
|
+
#
|
2141
2388
|
# @example Request syntax with placeholder values
|
2142
2389
|
#
|
2143
2390
|
# resp = client.delete_layer_version({
|
@@ -2176,6 +2423,17 @@ module Aws::Lambda
|
|
2176
2423
|
#
|
2177
2424
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2178
2425
|
#
|
2426
|
+
#
|
2427
|
+
# @example Example: To delete a provisioned concurrency configuration
|
2428
|
+
#
|
2429
|
+
# # The following example deletes the provisioned concurrency configuration for the GREEN alias of a function named
|
2430
|
+
# # my-function.
|
2431
|
+
#
|
2432
|
+
# resp = client.delete_provisioned_concurrency_config({
|
2433
|
+
# function_name: "my-function",
|
2434
|
+
# qualifier: "GREEN",
|
2435
|
+
# })
|
2436
|
+
#
|
2179
2437
|
# @example Request syntax with placeholder values
|
2180
2438
|
#
|
2181
2439
|
# resp = client.delete_provisioned_concurrency_config({
|
@@ -2192,6 +2450,48 @@ module Aws::Lambda
|
|
2192
2450
|
req.send_request(options)
|
2193
2451
|
end
|
2194
2452
|
|
2453
|
+
# <note markdown="1"> The option to create and modify full JSON resource-based policies, and
|
2454
|
+
# to use the PutResourcePolicy, GetResourcePolicy, and
|
2455
|
+
# DeleteResourcePolicy APIs, won't be available in all Amazon Web
|
2456
|
+
# Services Regions until September 30, 2024.
|
2457
|
+
#
|
2458
|
+
# </note>
|
2459
|
+
#
|
2460
|
+
# Deletes a [resource-based policy][1] from a function.
|
2461
|
+
#
|
2462
|
+
#
|
2463
|
+
#
|
2464
|
+
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
|
2465
|
+
#
|
2466
|
+
# @option params [required, String] :resource_arn
|
2467
|
+
# The Amazon Resource Name (ARN) of the function you want to delete the
|
2468
|
+
# policy from. You can use either a qualified or an unqualified ARN, but
|
2469
|
+
# the value you specify must be a complete ARN and wildcard characters
|
2470
|
+
# are not accepted.
|
2471
|
+
#
|
2472
|
+
# @option params [String] :revision_id
|
2473
|
+
# Delete the existing policy only if its revision ID matches the string
|
2474
|
+
# you specify. To find the revision ID of the policy currently attached
|
2475
|
+
# to your function, use the GetResourcePolicy action.
|
2476
|
+
#
|
2477
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2478
|
+
#
|
2479
|
+
# @example Request syntax with placeholder values
|
2480
|
+
#
|
2481
|
+
# resp = client.delete_resource_policy({
|
2482
|
+
# resource_arn: "PolicyResourceArn", # required
|
2483
|
+
# revision_id: "RevisionId",
|
2484
|
+
# })
|
2485
|
+
#
|
2486
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteResourcePolicy AWS API Documentation
|
2487
|
+
#
|
2488
|
+
# @overload delete_resource_policy(params = {})
|
2489
|
+
# @param [Hash] params ({})
|
2490
|
+
def delete_resource_policy(params = {}, options = {})
|
2491
|
+
req = build_request(:delete_resource_policy, params)
|
2492
|
+
req.send_request(options)
|
2493
|
+
end
|
2494
|
+
|
2195
2495
|
# Retrieves details about your account's [limits][1] and usage in an
|
2196
2496
|
# Amazon Web Services Region.
|
2197
2497
|
#
|
@@ -2204,6 +2504,29 @@ module Aws::Lambda
|
|
2204
2504
|
# * {Types::GetAccountSettingsResponse#account_limit #account_limit} => Types::AccountLimit
|
2205
2505
|
# * {Types::GetAccountSettingsResponse#account_usage #account_usage} => Types::AccountUsage
|
2206
2506
|
#
|
2507
|
+
#
|
2508
|
+
# @example Example: To get account settings
|
2509
|
+
#
|
2510
|
+
# # This operation takes no parameters and returns details about storage and concurrency quotas in the current Region.
|
2511
|
+
#
|
2512
|
+
# resp = client.get_account_settings({
|
2513
|
+
# })
|
2514
|
+
#
|
2515
|
+
# resp.to_h outputs the following:
|
2516
|
+
# {
|
2517
|
+
# account_limit: {
|
2518
|
+
# code_size_unzipped: 262144000,
|
2519
|
+
# code_size_zipped: 52428800,
|
2520
|
+
# concurrent_executions: 1000,
|
2521
|
+
# total_code_size: 80530636800,
|
2522
|
+
# unreserved_concurrent_executions: 1000,
|
2523
|
+
# },
|
2524
|
+
# account_usage: {
|
2525
|
+
# function_count: 4,
|
2526
|
+
# total_code_size: 9426,
|
2527
|
+
# },
|
2528
|
+
# }
|
2529
|
+
#
|
2207
2530
|
# @example Response structure
|
2208
2531
|
#
|
2209
2532
|
# resp.account_limit.total_code_size #=> Integer
|
@@ -2256,6 +2579,25 @@ module Aws::Lambda
|
|
2256
2579
|
# * {Types::AliasConfiguration#routing_config #routing_config} => Types::AliasRoutingConfiguration
|
2257
2580
|
# * {Types::AliasConfiguration#revision_id #revision_id} => String
|
2258
2581
|
#
|
2582
|
+
#
|
2583
|
+
# @example Example: To get a Lambda function alias
|
2584
|
+
#
|
2585
|
+
# # The following example returns details about an alias named BLUE for a function named my-function
|
2586
|
+
#
|
2587
|
+
# resp = client.get_alias({
|
2588
|
+
# function_name: "my-function",
|
2589
|
+
# name: "BLUE",
|
2590
|
+
# })
|
2591
|
+
#
|
2592
|
+
# resp.to_h outputs the following:
|
2593
|
+
# {
|
2594
|
+
# alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BLUE",
|
2595
|
+
# description: "Production environment BLUE.",
|
2596
|
+
# function_version: "3",
|
2597
|
+
# name: "BLUE",
|
2598
|
+
# revision_id: "594f41fb-xmpl-4c20-95c7-6ca5f2a92c93",
|
2599
|
+
# }
|
2600
|
+
#
|
2259
2601
|
# @example Request syntax with placeholder values
|
2260
2602
|
#
|
2261
2603
|
# resp = client.get_alias({
|
@@ -2353,6 +2695,34 @@ module Aws::Lambda
|
|
2353
2695
|
# * {Types::EventSourceMappingConfiguration#document_db_event_source_config #document_db_event_source_config} => Types::DocumentDBEventSourceConfig
|
2354
2696
|
# * {Types::EventSourceMappingConfiguration#kms_key_arn #kms_key_arn} => String
|
2355
2697
|
# * {Types::EventSourceMappingConfiguration#filter_criteria_error #filter_criteria_error} => Types::FilterCriteriaError
|
2698
|
+
# * {Types::EventSourceMappingConfiguration#event_source_mapping_arn #event_source_mapping_arn} => String
|
2699
|
+
#
|
2700
|
+
#
|
2701
|
+
# @example Example: To get a Lambda function's event source mapping
|
2702
|
+
#
|
2703
|
+
# # The following example returns details about an event source mapping. To get a mapping's UUID, use
|
2704
|
+
# # ListEventSourceMappings.
|
2705
|
+
#
|
2706
|
+
# resp = client.get_event_source_mapping({
|
2707
|
+
# uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
|
2708
|
+
# })
|
2709
|
+
#
|
2710
|
+
# resp.to_h outputs the following:
|
2711
|
+
# {
|
2712
|
+
# batch_size: 500,
|
2713
|
+
# bisect_batch_on_function_error: false,
|
2714
|
+
# destination_config: {
|
2715
|
+
# },
|
2716
|
+
# event_source_arn: "arn:aws:sqs:us-east-2:123456789012:mySQSqueue",
|
2717
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:myFunction",
|
2718
|
+
# last_modified: Time.parse("${timestamp}"),
|
2719
|
+
# last_processing_result: "No records processed",
|
2720
|
+
# maximum_record_age_in_seconds: 604800,
|
2721
|
+
# maximum_retry_attempts: 10000,
|
2722
|
+
# state: "Creating",
|
2723
|
+
# state_transition_reason: "User action",
|
2724
|
+
# uuid: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2",
|
2725
|
+
# }
|
2356
2726
|
#
|
2357
2727
|
# @example Request syntax with placeholder values
|
2358
2728
|
#
|
@@ -2403,6 +2773,7 @@ module Aws::Lambda
|
|
2403
2773
|
# resp.kms_key_arn #=> String
|
2404
2774
|
# resp.filter_criteria_error.error_code #=> String
|
2405
2775
|
# resp.filter_criteria_error.message #=> String
|
2776
|
+
# resp.event_source_mapping_arn #=> String
|
2406
2777
|
#
|
2407
2778
|
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping AWS API Documentation
|
2408
2779
|
#
|
@@ -2446,6 +2817,54 @@ module Aws::Lambda
|
|
2446
2817
|
# * {Types::GetFunctionResponse#tags #tags} => Hash<String,String>
|
2447
2818
|
# * {Types::GetFunctionResponse#concurrency #concurrency} => Types::Concurrency
|
2448
2819
|
#
|
2820
|
+
#
|
2821
|
+
# @example Example: To get a Lambda function
|
2822
|
+
#
|
2823
|
+
# # The following example returns code and configuration details for version 1 of a function named my-function.
|
2824
|
+
#
|
2825
|
+
# resp = client.get_function({
|
2826
|
+
# function_name: "my-function",
|
2827
|
+
# qualifier: "1",
|
2828
|
+
# })
|
2829
|
+
#
|
2830
|
+
# resp.to_h outputs the following:
|
2831
|
+
# {
|
2832
|
+
# code: {
|
2833
|
+
# location: "https://awslambda-us-west-2-tasks.s3.us-west-2.amazonaws.com/snapshots/123456789012/my-function-e7d9d1ed-xmpl-4f79-904a-4b87f2681f30?versionId=sH3TQwBOaUy...",
|
2834
|
+
# repository_type: "S3",
|
2835
|
+
# },
|
2836
|
+
# configuration: {
|
2837
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
2838
|
+
# code_size: 5797206,
|
2839
|
+
# description: "Process image objects from Amazon S3.",
|
2840
|
+
# environment: {
|
2841
|
+
# variables: {
|
2842
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
2843
|
+
# "PREFIX" => "inbound",
|
2844
|
+
# },
|
2845
|
+
# },
|
2846
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
2847
|
+
# function_name: "my-function",
|
2848
|
+
# handler: "index.handler",
|
2849
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
2850
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
2851
|
+
# last_update_status: "Successful",
|
2852
|
+
# memory_size: 256,
|
2853
|
+
# revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
|
2854
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
2855
|
+
# runtime: "nodejs12.x",
|
2856
|
+
# state: "Active",
|
2857
|
+
# timeout: 15,
|
2858
|
+
# tracing_config: {
|
2859
|
+
# mode: "Active",
|
2860
|
+
# },
|
2861
|
+
# version: "$LATEST",
|
2862
|
+
# },
|
2863
|
+
# tags: {
|
2864
|
+
# "DEPARTMENT" => "Assets",
|
2865
|
+
# },
|
2866
|
+
# }
|
2867
|
+
#
|
2449
2868
|
# @example Request syntax with placeholder values
|
2450
2869
|
#
|
2451
2870
|
# resp = client.get_function({
|
@@ -2607,6 +3026,20 @@ module Aws::Lambda
|
|
2607
3026
|
#
|
2608
3027
|
# * {Types::GetFunctionConcurrencyResponse#reserved_concurrent_executions #reserved_concurrent_executions} => Integer
|
2609
3028
|
#
|
3029
|
+
#
|
3030
|
+
# @example Example: To get the reserved concurrency setting for a function
|
3031
|
+
#
|
3032
|
+
# # The following example returns the reserved concurrency setting for a function named my-function.
|
3033
|
+
#
|
3034
|
+
# resp = client.get_function_concurrency({
|
3035
|
+
# function_name: "my-function",
|
3036
|
+
# })
|
3037
|
+
#
|
3038
|
+
# resp.to_h outputs the following:
|
3039
|
+
# {
|
3040
|
+
# reserved_concurrent_executions: 250,
|
3041
|
+
# }
|
3042
|
+
#
|
2610
3043
|
# @example Request syntax with placeholder values
|
2611
3044
|
#
|
2612
3045
|
# resp = client.get_function_concurrency({
|
@@ -2693,6 +3126,45 @@ module Aws::Lambda
|
|
2693
3126
|
# * {Types::FunctionConfiguration#runtime_version_config #runtime_version_config} => Types::RuntimeVersionConfig
|
2694
3127
|
# * {Types::FunctionConfiguration#logging_config #logging_config} => Types::LoggingConfig
|
2695
3128
|
#
|
3129
|
+
#
|
3130
|
+
# @example Example: To get a Lambda function's event source mapping
|
3131
|
+
#
|
3132
|
+
# # The following example returns and configuration details for version 1 of a function named my-function.
|
3133
|
+
#
|
3134
|
+
# resp = client.get_function_configuration({
|
3135
|
+
# function_name: "my-function",
|
3136
|
+
# qualifier: "1",
|
3137
|
+
# })
|
3138
|
+
#
|
3139
|
+
# resp.to_h outputs the following:
|
3140
|
+
# {
|
3141
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
3142
|
+
# code_size: 5797206,
|
3143
|
+
# description: "Process image objects from Amazon S3.",
|
3144
|
+
# environment: {
|
3145
|
+
# variables: {
|
3146
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
3147
|
+
# "PREFIX" => "inbound",
|
3148
|
+
# },
|
3149
|
+
# },
|
3150
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
3151
|
+
# function_name: "my-function",
|
3152
|
+
# handler: "index.handler",
|
3153
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
3154
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
3155
|
+
# last_update_status: "Successful",
|
3156
|
+
# memory_size: 256,
|
3157
|
+
# revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
|
3158
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
3159
|
+
# runtime: "nodejs12.x",
|
3160
|
+
# state: "Active",
|
3161
|
+
# timeout: 15,
|
3162
|
+
# tracing_config: {
|
3163
|
+
# mode: "Active",
|
3164
|
+
# },
|
3165
|
+
# version: "$LATEST",
|
3166
|
+
# }
|
3167
|
+
#
|
2696
3168
|
# @example Request syntax with placeholder values
|
2697
3169
|
#
|
2698
3170
|
# resp = client.get_function_configuration({
|
@@ -2816,6 +3288,32 @@ module Aws::Lambda
|
|
2816
3288
|
# * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
|
2817
3289
|
# * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
|
2818
3290
|
#
|
3291
|
+
#
|
3292
|
+
# @example Example: To get an asynchronous invocation configuration
|
3293
|
+
#
|
3294
|
+
# # The following example returns the asynchronous invocation configuration for the BLUE alias of a function named
|
3295
|
+
# # my-function.
|
3296
|
+
#
|
3297
|
+
# resp = client.get_function_event_invoke_config({
|
3298
|
+
# function_name: "my-function",
|
3299
|
+
# qualifier: "BLUE",
|
3300
|
+
# })
|
3301
|
+
#
|
3302
|
+
# resp.to_h outputs the following:
|
3303
|
+
# {
|
3304
|
+
# destination_config: {
|
3305
|
+
# on_failure: {
|
3306
|
+
# destination: "arn:aws:sqs:us-east-2:123456789012:failed-invocations",
|
3307
|
+
# },
|
3308
|
+
# on_success: {
|
3309
|
+
# },
|
3310
|
+
# },
|
3311
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
|
3312
|
+
# last_modified: Time.parse("${timestamp}"),
|
3313
|
+
# maximum_event_age_in_seconds: 3600,
|
3314
|
+
# maximum_retry_attempts: 0,
|
3315
|
+
# }
|
3316
|
+
#
|
2819
3317
|
# @example Request syntax with placeholder values
|
2820
3318
|
#
|
2821
3319
|
# resp = client.get_function_event_invoke_config({
|
@@ -2962,6 +3460,35 @@ module Aws::Lambda
|
|
2962
3460
|
# * {Types::GetLayerVersionResponse#license_info #license_info} => String
|
2963
3461
|
# * {Types::GetLayerVersionResponse#compatible_architectures #compatible_architectures} => Array<String>
|
2964
3462
|
#
|
3463
|
+
#
|
3464
|
+
# @example Example: To get information about a Lambda layer version
|
3465
|
+
#
|
3466
|
+
# # The following example returns information for version 1 of a layer named my-layer.
|
3467
|
+
#
|
3468
|
+
# resp = client.get_layer_version({
|
3469
|
+
# layer_name: "my-layer",
|
3470
|
+
# version_number: 1,
|
3471
|
+
# })
|
3472
|
+
#
|
3473
|
+
# resp.to_h outputs the following:
|
3474
|
+
# {
|
3475
|
+
# compatible_runtimes: [
|
3476
|
+
# "python3.6",
|
3477
|
+
# "python3.7",
|
3478
|
+
# ],
|
3479
|
+
# content: {
|
3480
|
+
# code_sha_256: "tv9jJO+rPbXUUXuRKi7CwHzKtLDkDRJLB3cC3Z/ouXo=",
|
3481
|
+
# code_size: 169,
|
3482
|
+
# location: "https://awslambda-us-east-2-layers.s3.us-east-2.amazonaws.com/snapshots/123456789012/my-layer-4aaa2fbb-ff77-4b0a-ad92-5b78a716a96a?versionId=27iWyA73cCAYqyH...",
|
3483
|
+
# },
|
3484
|
+
# created_date: Time.parse("2018-11-14T23:03:52.894+0000"),
|
3485
|
+
# description: "My Python layer",
|
3486
|
+
# layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer",
|
3487
|
+
# layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer:1",
|
3488
|
+
# license_info: "MIT",
|
3489
|
+
# version: 1,
|
3490
|
+
# }
|
3491
|
+
#
|
2965
3492
|
# @example Request syntax with placeholder values
|
2966
3493
|
#
|
2967
3494
|
# resp = client.get_layer_version({
|
@@ -3018,6 +3545,32 @@ module Aws::Lambda
|
|
3018
3545
|
# * {Types::GetLayerVersionResponse#license_info #license_info} => String
|
3019
3546
|
# * {Types::GetLayerVersionResponse#compatible_architectures #compatible_architectures} => Array<String>
|
3020
3547
|
#
|
3548
|
+
#
|
3549
|
+
# @example Example: To get information about a Lambda layer version
|
3550
|
+
#
|
3551
|
+
# # The following example returns information about the layer version with the specified Amazon Resource Name (ARN).
|
3552
|
+
#
|
3553
|
+
# resp = client.get_layer_version_by_arn({
|
3554
|
+
# arn: "arn:aws:lambda:ca-central-1:123456789012:layer:blank-python-lib:3",
|
3555
|
+
# })
|
3556
|
+
#
|
3557
|
+
# resp.to_h outputs the following:
|
3558
|
+
# {
|
3559
|
+
# compatible_runtimes: [
|
3560
|
+
# "python3.8",
|
3561
|
+
# ],
|
3562
|
+
# content: {
|
3563
|
+
# code_sha_256: "6x+xmpl/M3BnQUk7gS9sGmfeFsR/npojXoA3fZUv4eU=",
|
3564
|
+
# code_size: 9529009,
|
3565
|
+
# 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...",
|
3566
|
+
# },
|
3567
|
+
# created_date: Time.parse("2020-03-31T00:35:18.949+0000"),
|
3568
|
+
# description: "Dependencies for the blank-python sample app.",
|
3569
|
+
# layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-python-lib",
|
3570
|
+
# layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-python-lib:3",
|
3571
|
+
# version: 3,
|
3572
|
+
# }
|
3573
|
+
#
|
3021
3574
|
# @example Request syntax with placeholder values
|
3022
3575
|
#
|
3023
3576
|
# resp = client.get_layer_version_by_arn({
|
@@ -3122,6 +3675,22 @@ module Aws::Lambda
|
|
3122
3675
|
# * {Types::GetPolicyResponse#policy #policy} => String
|
3123
3676
|
# * {Types::GetPolicyResponse#revision_id #revision_id} => String
|
3124
3677
|
#
|
3678
|
+
#
|
3679
|
+
# @example Example: To retrieve a Lambda function policy
|
3680
|
+
#
|
3681
|
+
# # The following example returns the resource-based policy for version 1 of a Lambda function named my-function.
|
3682
|
+
#
|
3683
|
+
# resp = client.get_policy({
|
3684
|
+
# function_name: "my-function",
|
3685
|
+
# qualifier: "1",
|
3686
|
+
# })
|
3687
|
+
#
|
3688
|
+
# resp.to_h outputs the following:
|
3689
|
+
# {
|
3690
|
+
# 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\"}]}",
|
3691
|
+
# revision_id: "4843f2f6-7c59-4fda-b484-afd0bc0e22b8",
|
3692
|
+
# }
|
3693
|
+
#
|
3125
3694
|
# @example Request syntax with placeholder values
|
3126
3695
|
#
|
3127
3696
|
# resp = client.get_policy({
|
@@ -3173,6 +3742,45 @@ module Aws::Lambda
|
|
3173
3742
|
# * {Types::GetProvisionedConcurrencyConfigResponse#status_reason #status_reason} => String
|
3174
3743
|
# * {Types::GetProvisionedConcurrencyConfigResponse#last_modified #last_modified} => Time
|
3175
3744
|
#
|
3745
|
+
#
|
3746
|
+
# @example Example: To view a provisioned concurrency configuration
|
3747
|
+
#
|
3748
|
+
# # The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified
|
3749
|
+
# # function.
|
3750
|
+
#
|
3751
|
+
# resp = client.get_provisioned_concurrency_config({
|
3752
|
+
# function_name: "my-function",
|
3753
|
+
# qualifier: "BLUE",
|
3754
|
+
# })
|
3755
|
+
#
|
3756
|
+
# resp.to_h outputs the following:
|
3757
|
+
# {
|
3758
|
+
# allocated_provisioned_concurrent_executions: 100,
|
3759
|
+
# available_provisioned_concurrent_executions: 100,
|
3760
|
+
# last_modified: Time.parse("2019-12-31T20:28:49+0000"),
|
3761
|
+
# requested_provisioned_concurrent_executions: 100,
|
3762
|
+
# status: "READY",
|
3763
|
+
# }
|
3764
|
+
#
|
3765
|
+
# @example Example: To get a provisioned concurrency configuration
|
3766
|
+
#
|
3767
|
+
# # The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified
|
3768
|
+
# # function.
|
3769
|
+
#
|
3770
|
+
# resp = client.get_provisioned_concurrency_config({
|
3771
|
+
# function_name: "my-function",
|
3772
|
+
# qualifier: "BLUE",
|
3773
|
+
# })
|
3774
|
+
#
|
3775
|
+
# resp.to_h outputs the following:
|
3776
|
+
# {
|
3777
|
+
# allocated_provisioned_concurrent_executions: 100,
|
3778
|
+
# available_provisioned_concurrent_executions: 100,
|
3779
|
+
# last_modified: Time.parse("2019-12-31T20:28:49+0000"),
|
3780
|
+
# requested_provisioned_concurrent_executions: 100,
|
3781
|
+
# status: "READY",
|
3782
|
+
# }
|
3783
|
+
#
|
3176
3784
|
# @example Request syntax with placeholder values
|
3177
3785
|
#
|
3178
3786
|
# resp = client.get_provisioned_concurrency_config({
|
@@ -3198,6 +3806,86 @@ module Aws::Lambda
|
|
3198
3806
|
req.send_request(options)
|
3199
3807
|
end
|
3200
3808
|
|
3809
|
+
# <note markdown="1"> The option to configure public-access settings, and to use the
|
3810
|
+
# PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be
|
3811
|
+
# available in all Amazon Web Services Regions until September 30, 2024.
|
3812
|
+
#
|
3813
|
+
# </note>
|
3814
|
+
#
|
3815
|
+
# Retrieve the public-access settings for a function.
|
3816
|
+
#
|
3817
|
+
# @option params [required, String] :resource_arn
|
3818
|
+
# The Amazon Resource Name (ARN) of the function you want to retrieve
|
3819
|
+
# public-access settings for.
|
3820
|
+
#
|
3821
|
+
# @return [Types::GetPublicAccessBlockConfigResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3822
|
+
#
|
3823
|
+
# * {Types::GetPublicAccessBlockConfigResponse#public_access_block_config #public_access_block_config} => Types::PublicAccessBlockConfig
|
3824
|
+
#
|
3825
|
+
# @example Request syntax with placeholder values
|
3826
|
+
#
|
3827
|
+
# resp = client.get_public_access_block_config({
|
3828
|
+
# resource_arn: "PublicAccessBlockResourceArn", # required
|
3829
|
+
# })
|
3830
|
+
#
|
3831
|
+
# @example Response structure
|
3832
|
+
#
|
3833
|
+
# resp.public_access_block_config.block_public_policy #=> Boolean
|
3834
|
+
# resp.public_access_block_config.restrict_public_resource #=> Boolean
|
3835
|
+
#
|
3836
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPublicAccessBlockConfig AWS API Documentation
|
3837
|
+
#
|
3838
|
+
# @overload get_public_access_block_config(params = {})
|
3839
|
+
# @param [Hash] params ({})
|
3840
|
+
def get_public_access_block_config(params = {}, options = {})
|
3841
|
+
req = build_request(:get_public_access_block_config, params)
|
3842
|
+
req.send_request(options)
|
3843
|
+
end
|
3844
|
+
|
3845
|
+
# <note markdown="1"> The option to create and modify full JSON resource-based policies, and
|
3846
|
+
# to use the PutResourcePolicy, GetResourcePolicy, and
|
3847
|
+
# DeleteResourcePolicy APIs, won't be available in all Amazon Web
|
3848
|
+
# Services Regions until September 30, 2024.
|
3849
|
+
#
|
3850
|
+
# </note>
|
3851
|
+
#
|
3852
|
+
# Retrieves the [resource-based policy][1] attached to a function.
|
3853
|
+
#
|
3854
|
+
#
|
3855
|
+
#
|
3856
|
+
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
|
3857
|
+
#
|
3858
|
+
# @option params [required, String] :resource_arn
|
3859
|
+
# The Amazon Resource Name (ARN) of the function you want to retrieve
|
3860
|
+
# the policy for. You can use either a qualified or an unqualified ARN,
|
3861
|
+
# but the value you specify must be a complete ARN and wildcard
|
3862
|
+
# characters are not accepted.
|
3863
|
+
#
|
3864
|
+
# @return [Types::GetResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3865
|
+
#
|
3866
|
+
# * {Types::GetResourcePolicyResponse#policy #policy} => String
|
3867
|
+
# * {Types::GetResourcePolicyResponse#revision_id #revision_id} => String
|
3868
|
+
#
|
3869
|
+
# @example Request syntax with placeholder values
|
3870
|
+
#
|
3871
|
+
# resp = client.get_resource_policy({
|
3872
|
+
# resource_arn: "PolicyResourceArn", # required
|
3873
|
+
# })
|
3874
|
+
#
|
3875
|
+
# @example Response structure
|
3876
|
+
#
|
3877
|
+
# resp.policy #=> String
|
3878
|
+
# resp.revision_id #=> String
|
3879
|
+
#
|
3880
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetResourcePolicy AWS API Documentation
|
3881
|
+
#
|
3882
|
+
# @overload get_resource_policy(params = {})
|
3883
|
+
# @param [Hash] params ({})
|
3884
|
+
def get_resource_policy(params = {}, options = {})
|
3885
|
+
req = build_request(:get_resource_policy, params)
|
3886
|
+
req.send_request(options)
|
3887
|
+
end
|
3888
|
+
|
3201
3889
|
# Retrieves the runtime management configuration for a function's
|
3202
3890
|
# version. If the runtime update mode is **Manual**, this includes the
|
3203
3891
|
# ARN of the runtime version and the runtime update mode. If the runtime
|
@@ -3374,6 +4062,40 @@ module Aws::Lambda
|
|
3374
4062
|
# * {Types::InvocationResponse#payload #payload} => String
|
3375
4063
|
# * {Types::InvocationResponse#executed_version #executed_version} => String
|
3376
4064
|
#
|
4065
|
+
#
|
4066
|
+
# @example Example: To invoke a Lambda function
|
4067
|
+
#
|
4068
|
+
# # The following example invokes version 1 of a function named my-function with an empty event payload.
|
4069
|
+
#
|
4070
|
+
# resp = client.invoke({
|
4071
|
+
# function_name: "my-function",
|
4072
|
+
# payload: "{}",
|
4073
|
+
# qualifier: "1",
|
4074
|
+
# })
|
4075
|
+
#
|
4076
|
+
# resp.to_h outputs the following:
|
4077
|
+
# {
|
4078
|
+
# payload: "200 SUCCESS",
|
4079
|
+
# status_code: 200,
|
4080
|
+
# }
|
4081
|
+
#
|
4082
|
+
# @example Example: To invoke a Lambda function asynchronously
|
4083
|
+
#
|
4084
|
+
# # The following example invokes version 1 of a function named my-function asynchronously.
|
4085
|
+
#
|
4086
|
+
# resp = client.invoke({
|
4087
|
+
# function_name: "my-function",
|
4088
|
+
# invocation_type: "Event",
|
4089
|
+
# payload: "{}",
|
4090
|
+
# qualifier: "1",
|
4091
|
+
# })
|
4092
|
+
#
|
4093
|
+
# resp.to_h outputs the following:
|
4094
|
+
# {
|
4095
|
+
# payload: "",
|
4096
|
+
# status_code: 202,
|
4097
|
+
# }
|
4098
|
+
#
|
3377
4099
|
# @example Request syntax with placeholder values
|
3378
4100
|
#
|
3379
4101
|
# resp = client.invoke({
|
@@ -3430,9 +4152,24 @@ module Aws::Lambda
|
|
3430
4152
|
# @option params [required, String, StringIO, File] :invoke_args
|
3431
4153
|
# The JSON that you want to provide to your Lambda function as input.
|
3432
4154
|
#
|
3433
|
-
# @return [Types::InvokeAsyncResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4155
|
+
# @return [Types::InvokeAsyncResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4156
|
+
#
|
4157
|
+
# * {Types::InvokeAsyncResponse#status #status} => Integer
|
4158
|
+
#
|
4159
|
+
#
|
4160
|
+
# @example Example: To invoke a Lambda function asynchronously
|
4161
|
+
#
|
4162
|
+
# # The following example invokes a Lambda function asynchronously
|
4163
|
+
#
|
4164
|
+
# resp = client.invoke_async({
|
4165
|
+
# function_name: "my-function",
|
4166
|
+
# invoke_args: "{}",
|
4167
|
+
# })
|
3434
4168
|
#
|
3435
|
-
#
|
4169
|
+
# resp.to_h outputs the following:
|
4170
|
+
# {
|
4171
|
+
# status: 202,
|
4172
|
+
# }
|
3436
4173
|
#
|
3437
4174
|
# @example Request syntax with placeholder values
|
3438
4175
|
#
|
@@ -3706,6 +4443,40 @@ module Aws::Lambda
|
|
3706
4443
|
#
|
3707
4444
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
3708
4445
|
#
|
4446
|
+
#
|
4447
|
+
# @example Example: To list a function's aliases
|
4448
|
+
#
|
4449
|
+
# # The following example returns a list of aliases for a function named my-function.
|
4450
|
+
#
|
4451
|
+
# resp = client.list_aliases({
|
4452
|
+
# function_name: "my-function",
|
4453
|
+
# })
|
4454
|
+
#
|
4455
|
+
# resp.to_h outputs the following:
|
4456
|
+
# {
|
4457
|
+
# aliases: [
|
4458
|
+
# {
|
4459
|
+
# alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BETA",
|
4460
|
+
# description: "Production environment BLUE.",
|
4461
|
+
# function_version: "2",
|
4462
|
+
# name: "BLUE",
|
4463
|
+
# revision_id: "a410117f-xmpl-494e-8035-7e204bb7933b",
|
4464
|
+
# routing_config: {
|
4465
|
+
# additional_version_weights: {
|
4466
|
+
# "1" => 0.7,
|
4467
|
+
# },
|
4468
|
+
# },
|
4469
|
+
# },
|
4470
|
+
# {
|
4471
|
+
# alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:LIVE",
|
4472
|
+
# description: "Production environment GREEN.",
|
4473
|
+
# function_version: "1",
|
4474
|
+
# name: "GREEN",
|
4475
|
+
# revision_id: "21d40116-xmpl-40ba-9360-3ea284da1bb5",
|
4476
|
+
# },
|
4477
|
+
# ],
|
4478
|
+
# }
|
4479
|
+
#
|
3709
4480
|
# @example Request syntax with placeholder values
|
3710
4481
|
#
|
3711
4482
|
# resp = client.list_aliases({
|
@@ -3844,6 +4615,30 @@ module Aws::Lambda
|
|
3844
4615
|
#
|
3845
4616
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
3846
4617
|
#
|
4618
|
+
#
|
4619
|
+
# @example Example: To list the event source mappings for a function
|
4620
|
+
#
|
4621
|
+
# # The following example returns a list of the event source mappings for a function named my-function.
|
4622
|
+
#
|
4623
|
+
# resp = client.list_event_source_mappings({
|
4624
|
+
# function_name: "my-function",
|
4625
|
+
# })
|
4626
|
+
#
|
4627
|
+
# resp.to_h outputs the following:
|
4628
|
+
# {
|
4629
|
+
# event_source_mappings: [
|
4630
|
+
# {
|
4631
|
+
# batch_size: 5,
|
4632
|
+
# event_source_arn: "arn:aws:sqs:us-west-2:123456789012:mySQSqueue",
|
4633
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
4634
|
+
# last_modified: Time.parse(1569284520.333),
|
4635
|
+
# state: "Enabled",
|
4636
|
+
# state_transition_reason: "USER_INITIATED",
|
4637
|
+
# uuid: "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
|
4638
|
+
# },
|
4639
|
+
# ],
|
4640
|
+
# }
|
4641
|
+
#
|
3847
4642
|
# @example Request syntax with placeholder values
|
3848
4643
|
#
|
3849
4644
|
# resp = client.list_event_source_mappings({
|
@@ -3898,6 +4693,7 @@ module Aws::Lambda
|
|
3898
4693
|
# resp.event_source_mappings[0].kms_key_arn #=> String
|
3899
4694
|
# resp.event_source_mappings[0].filter_criteria_error.error_code #=> String
|
3900
4695
|
# resp.event_source_mappings[0].filter_criteria_error.message #=> String
|
4696
|
+
# resp.event_source_mappings[0].event_source_mapping_arn #=> String
|
3901
4697
|
#
|
3902
4698
|
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings AWS API Documentation
|
3903
4699
|
#
|
@@ -3943,6 +4739,33 @@ module Aws::Lambda
|
|
3943
4739
|
#
|
3944
4740
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
3945
4741
|
#
|
4742
|
+
#
|
4743
|
+
# @example Example: To view a list of asynchronous invocation configurations
|
4744
|
+
#
|
4745
|
+
# # The following example returns a list of asynchronous invocation configurations for a function named my-function.
|
4746
|
+
#
|
4747
|
+
# resp = client.list_function_event_invoke_configs({
|
4748
|
+
# function_name: "my-function",
|
4749
|
+
# })
|
4750
|
+
#
|
4751
|
+
# resp.to_h outputs the following:
|
4752
|
+
# {
|
4753
|
+
# function_event_invoke_configs: [
|
4754
|
+
# {
|
4755
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:GREEN",
|
4756
|
+
# last_modified: Time.parse(1577824406.719),
|
4757
|
+
# maximum_event_age_in_seconds: 1800,
|
4758
|
+
# maximum_retry_attempts: 2,
|
4759
|
+
# },
|
4760
|
+
# {
|
4761
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
|
4762
|
+
# last_modified: Time.parse(1577824396.653),
|
4763
|
+
# maximum_event_age_in_seconds: 3600,
|
4764
|
+
# maximum_retry_attempts: 0,
|
4765
|
+
# },
|
4766
|
+
# ],
|
4767
|
+
# }
|
4768
|
+
#
|
3946
4769
|
# @example Request syntax with placeholder values
|
3947
4770
|
#
|
3948
4771
|
# resp = client.list_function_event_invoke_configs({
|
@@ -4083,6 +4906,64 @@ module Aws::Lambda
|
|
4083
4906
|
#
|
4084
4907
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4085
4908
|
#
|
4909
|
+
#
|
4910
|
+
# @example Example: To get a list of Lambda functions
|
4911
|
+
#
|
4912
|
+
# # This operation returns a list of Lambda functions.
|
4913
|
+
#
|
4914
|
+
# resp = client.list_functions({
|
4915
|
+
# })
|
4916
|
+
#
|
4917
|
+
# resp.to_h outputs the following:
|
4918
|
+
# {
|
4919
|
+
# functions: [
|
4920
|
+
# {
|
4921
|
+
# code_sha_256: "dBG9m8SGdmlEjw/JYXlhhvCrAv5TxvXsbL/RMr0fT/I=",
|
4922
|
+
# code_size: 294,
|
4923
|
+
# description: "",
|
4924
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:helloworld",
|
4925
|
+
# function_name: "helloworld",
|
4926
|
+
# handler: "helloworld.handler",
|
4927
|
+
# last_modified: Time.parse("2019-09-23T18:32:33.857+0000"),
|
4928
|
+
# memory_size: 128,
|
4929
|
+
# revision_id: "1718e831-badf-4253-9518-d0644210af7b",
|
4930
|
+
# role: "arn:aws:iam::123456789012:role/service-role/MyTestFunction-role-zgur6bf4",
|
4931
|
+
# runtime: "nodejs10.x",
|
4932
|
+
# timeout: 3,
|
4933
|
+
# tracing_config: {
|
4934
|
+
# mode: "PassThrough",
|
4935
|
+
# },
|
4936
|
+
# version: "$LATEST",
|
4937
|
+
# },
|
4938
|
+
# {
|
4939
|
+
# code_sha_256: "sU0cJ2/hOZevwV/lTxCuQqK3gDZP3i8gUoqUUVRmY6E=",
|
4940
|
+
# code_size: 266,
|
4941
|
+
# description: "",
|
4942
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
4943
|
+
# function_name: "my-function",
|
4944
|
+
# handler: "index.handler",
|
4945
|
+
# last_modified: Time.parse("2019-10-01T16:47:28.490+0000"),
|
4946
|
+
# memory_size: 256,
|
4947
|
+
# revision_id: "93017fc9-59cb-41dc-901b-4845ce4bf668",
|
4948
|
+
# role: "arn:aws:iam::123456789012:role/service-role/helloWorldPython-role-uy3l9qyq",
|
4949
|
+
# runtime: "nodejs10.x",
|
4950
|
+
# timeout: 3,
|
4951
|
+
# tracing_config: {
|
4952
|
+
# mode: "PassThrough",
|
4953
|
+
# },
|
4954
|
+
# version: "$LATEST",
|
4955
|
+
# vpc_config: {
|
4956
|
+
# security_group_ids: [
|
4957
|
+
# ],
|
4958
|
+
# subnet_ids: [
|
4959
|
+
# ],
|
4960
|
+
# vpc_id: "",
|
4961
|
+
# },
|
4962
|
+
# },
|
4963
|
+
# ],
|
4964
|
+
# next_marker: "",
|
4965
|
+
# }
|
4966
|
+
#
|
4086
4967
|
# @example Request syntax with placeholder values
|
4087
4968
|
#
|
4088
4969
|
# resp = client.list_functions({
|
@@ -4261,6 +5142,39 @@ module Aws::Lambda
|
|
4261
5142
|
#
|
4262
5143
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4263
5144
|
#
|
5145
|
+
#
|
5146
|
+
# @example Example: To list versions of a layer
|
5147
|
+
#
|
5148
|
+
# # The following example displays information about the versions for the layer named blank-java-lib
|
5149
|
+
#
|
5150
|
+
# resp = client.list_layer_versions({
|
5151
|
+
# layer_name: "blank-java-lib",
|
5152
|
+
# })
|
5153
|
+
#
|
5154
|
+
# resp.to_h outputs the following:
|
5155
|
+
# {
|
5156
|
+
# layer_versions: [
|
5157
|
+
# {
|
5158
|
+
# compatible_runtimes: [
|
5159
|
+
# "java8",
|
5160
|
+
# ],
|
5161
|
+
# created_date: Time.parse("2020-03-18T23:38:42.284+0000"),
|
5162
|
+
# description: "Dependencies for the blank-java sample app.",
|
5163
|
+
# layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-java-lib:7",
|
5164
|
+
# version: 7,
|
5165
|
+
# },
|
5166
|
+
# {
|
5167
|
+
# compatible_runtimes: [
|
5168
|
+
# "java8",
|
5169
|
+
# ],
|
5170
|
+
# created_date: Time.parse("2020-03-17T07:24:21.960+0000"),
|
5171
|
+
# description: "Dependencies for the blank-java sample app.",
|
5172
|
+
# layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:blank-java-lib:6",
|
5173
|
+
# version: 6,
|
5174
|
+
# },
|
5175
|
+
# ],
|
5176
|
+
# }
|
5177
|
+
#
|
4264
5178
|
# @example Request syntax with placeholder values
|
4265
5179
|
#
|
4266
5180
|
# resp = client.list_layer_versions({
|
@@ -4340,6 +5254,35 @@ module Aws::Lambda
|
|
4340
5254
|
#
|
4341
5255
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4342
5256
|
#
|
5257
|
+
#
|
5258
|
+
# @example Example: To list the layers that are compatible with your function's runtime
|
5259
|
+
#
|
5260
|
+
# # The following example returns information about layers that are compatible with the Python 3.7 runtime.
|
5261
|
+
#
|
5262
|
+
# resp = client.list_layers({
|
5263
|
+
# compatible_runtime: "python3.7",
|
5264
|
+
# })
|
5265
|
+
#
|
5266
|
+
# resp.to_h outputs the following:
|
5267
|
+
# {
|
5268
|
+
# layers: [
|
5269
|
+
# {
|
5270
|
+
# latest_matching_version: {
|
5271
|
+
# compatible_runtimes: [
|
5272
|
+
# "python3.6",
|
5273
|
+
# "python3.7",
|
5274
|
+
# ],
|
5275
|
+
# created_date: Time.parse("2018-11-15T00:37:46.592+0000"),
|
5276
|
+
# description: "My layer",
|
5277
|
+
# layer_version_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer:2",
|
5278
|
+
# version: 2,
|
5279
|
+
# },
|
5280
|
+
# layer_arn: "arn:aws:lambda:us-east-2:123456789012:layer:my-layer",
|
5281
|
+
# layer_name: "my-layer",
|
5282
|
+
# },
|
5283
|
+
# ],
|
5284
|
+
# }
|
5285
|
+
#
|
4343
5286
|
# @example Request syntax with placeholder values
|
4344
5287
|
#
|
4345
5288
|
# resp = client.list_layers({
|
@@ -4406,6 +5349,37 @@ module Aws::Lambda
|
|
4406
5349
|
#
|
4407
5350
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4408
5351
|
#
|
5352
|
+
#
|
5353
|
+
# @example Example: To get a list of provisioned concurrency configurations
|
5354
|
+
#
|
5355
|
+
# # The following example returns a list of provisioned concurrency configurations for a function named my-function.
|
5356
|
+
#
|
5357
|
+
# resp = client.list_provisioned_concurrency_configs({
|
5358
|
+
# function_name: "my-function",
|
5359
|
+
# })
|
5360
|
+
#
|
5361
|
+
# resp.to_h outputs the following:
|
5362
|
+
# {
|
5363
|
+
# provisioned_concurrency_configs: [
|
5364
|
+
# {
|
5365
|
+
# allocated_provisioned_concurrent_executions: 100,
|
5366
|
+
# available_provisioned_concurrent_executions: 100,
|
5367
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:GREEN",
|
5368
|
+
# last_modified: Time.parse("2019-12-31T20:29:00+0000"),
|
5369
|
+
# requested_provisioned_concurrent_executions: 100,
|
5370
|
+
# status: "READY",
|
5371
|
+
# },
|
5372
|
+
# {
|
5373
|
+
# allocated_provisioned_concurrent_executions: 100,
|
5374
|
+
# available_provisioned_concurrent_executions: 100,
|
5375
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE",
|
5376
|
+
# last_modified: Time.parse("2019-12-31T20:28:49+0000"),
|
5377
|
+
# requested_provisioned_concurrent_executions: 100,
|
5378
|
+
# status: "READY",
|
5379
|
+
# },
|
5380
|
+
# ],
|
5381
|
+
# }
|
5382
|
+
#
|
4409
5383
|
# @example Request syntax with placeholder values
|
4410
5384
|
#
|
4411
5385
|
# resp = client.list_provisioned_concurrency_configs({
|
@@ -4435,7 +5409,8 @@ module Aws::Lambda
|
|
4435
5409
|
req.send_request(options)
|
4436
5410
|
end
|
4437
5411
|
|
4438
|
-
# Returns a function
|
5412
|
+
# Returns a function, event source mapping, or code signing
|
5413
|
+
# configuration's [tags][1]. You can also view funciton tags with
|
4439
5414
|
# GetFunction.
|
4440
5415
|
#
|
4441
5416
|
#
|
@@ -4443,17 +5418,34 @@ module Aws::Lambda
|
|
4443
5418
|
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
|
4444
5419
|
#
|
4445
5420
|
# @option params [required, String] :resource
|
4446
|
-
# The
|
4447
|
-
# support adding tags to aliases or versions.
|
5421
|
+
# The resource's Amazon Resource Name (ARN). Note: Lambda does not
|
5422
|
+
# support adding tags to function aliases or versions.
|
4448
5423
|
#
|
4449
5424
|
# @return [Types::ListTagsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4450
5425
|
#
|
4451
5426
|
# * {Types::ListTagsResponse#tags #tags} => Hash<String,String>
|
4452
5427
|
#
|
5428
|
+
#
|
5429
|
+
# @example Example: To retrieve the list of tags for a Lambda function
|
5430
|
+
#
|
5431
|
+
# # The following example displays the tags attached to the my-function Lambda function.
|
5432
|
+
#
|
5433
|
+
# resp = client.list_tags({
|
5434
|
+
# resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
5435
|
+
# })
|
5436
|
+
#
|
5437
|
+
# resp.to_h outputs the following:
|
5438
|
+
# {
|
5439
|
+
# tags: {
|
5440
|
+
# "Category" => "Web Tools",
|
5441
|
+
# "Department" => "Sales",
|
5442
|
+
# },
|
5443
|
+
# }
|
5444
|
+
#
|
4453
5445
|
# @example Request syntax with placeholder values
|
4454
5446
|
#
|
4455
5447
|
# resp = client.list_tags({
|
4456
|
-
# resource: "
|
5448
|
+
# resource: "TaggableResource", # required
|
4457
5449
|
# })
|
4458
5450
|
#
|
4459
5451
|
# @example Response structure
|
@@ -4508,6 +5500,71 @@ module Aws::Lambda
|
|
4508
5500
|
#
|
4509
5501
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4510
5502
|
#
|
5503
|
+
#
|
5504
|
+
# @example Example: To list versions of a function
|
5505
|
+
#
|
5506
|
+
# # The following example returns a list of versions of a function named my-function
|
5507
|
+
#
|
5508
|
+
# resp = client.list_versions_by_function({
|
5509
|
+
# function_name: "my-function",
|
5510
|
+
# })
|
5511
|
+
#
|
5512
|
+
# resp.to_h outputs the following:
|
5513
|
+
# {
|
5514
|
+
# versions: [
|
5515
|
+
# {
|
5516
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
5517
|
+
# code_size: 5797206,
|
5518
|
+
# description: "Process image objects from Amazon S3.",
|
5519
|
+
# environment: {
|
5520
|
+
# variables: {
|
5521
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
5522
|
+
# "PREFIX" => "inbound",
|
5523
|
+
# },
|
5524
|
+
# },
|
5525
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
5526
|
+
# function_name: "my-function",
|
5527
|
+
# handler: "index.handler",
|
5528
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
5529
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
5530
|
+
# memory_size: 256,
|
5531
|
+
# revision_id: "850ca006-2d98-4ff4-86db-8766e9d32fe9",
|
5532
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
5533
|
+
# runtime: "nodejs12.x",
|
5534
|
+
# timeout: 15,
|
5535
|
+
# tracing_config: {
|
5536
|
+
# mode: "Active",
|
5537
|
+
# },
|
5538
|
+
# version: "$LATEST",
|
5539
|
+
# },
|
5540
|
+
# {
|
5541
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
5542
|
+
# code_size: 5797206,
|
5543
|
+
# description: "Process image objects from Amazon S3.",
|
5544
|
+
# environment: {
|
5545
|
+
# variables: {
|
5546
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
5547
|
+
# "PREFIX" => "inbound",
|
5548
|
+
# },
|
5549
|
+
# },
|
5550
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
5551
|
+
# function_name: "my-function",
|
5552
|
+
# handler: "index.handler",
|
5553
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
5554
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
5555
|
+
# memory_size: 256,
|
5556
|
+
# revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
|
5557
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
5558
|
+
# runtime: "nodejs12.x",
|
5559
|
+
# timeout: 5,
|
5560
|
+
# tracing_config: {
|
5561
|
+
# mode: "Active",
|
5562
|
+
# },
|
5563
|
+
# version: "1",
|
5564
|
+
# },
|
5565
|
+
# ],
|
5566
|
+
# }
|
5567
|
+
#
|
4511
5568
|
# @example Request syntax with placeholder values
|
4512
5569
|
#
|
4513
5570
|
# resp = client.list_versions_by_function({
|
@@ -4658,6 +5715,45 @@ module Aws::Lambda
|
|
4658
5715
|
# * {Types::PublishLayerVersionResponse#license_info #license_info} => String
|
4659
5716
|
# * {Types::PublishLayerVersionResponse#compatible_architectures #compatible_architectures} => Array<String>
|
4660
5717
|
#
|
5718
|
+
#
|
5719
|
+
# @example Example: To create a Lambda layer version
|
5720
|
+
#
|
5721
|
+
# # The following example creates a new Python library layer version. The command retrieves the layer content a file named
|
5722
|
+
# # layer.zip in the specified S3 bucket.
|
5723
|
+
#
|
5724
|
+
# resp = client.publish_layer_version({
|
5725
|
+
# compatible_runtimes: [
|
5726
|
+
# "python3.6",
|
5727
|
+
# "python3.7",
|
5728
|
+
# ],
|
5729
|
+
# content: {
|
5730
|
+
# s3_bucket: "lambda-layers-us-west-2-123456789012",
|
5731
|
+
# s3_key: "layer.zip",
|
5732
|
+
# },
|
5733
|
+
# description: "My Python layer",
|
5734
|
+
# layer_name: "my-layer",
|
5735
|
+
# license_info: "MIT",
|
5736
|
+
# })
|
5737
|
+
#
|
5738
|
+
# resp.to_h outputs the following:
|
5739
|
+
# {
|
5740
|
+
# compatible_runtimes: [
|
5741
|
+
# "python3.6",
|
5742
|
+
# "python3.7",
|
5743
|
+
# ],
|
5744
|
+
# content: {
|
5745
|
+
# code_sha_256: "tv9jJO+rPbXUUXuRKi7CwHzKtLDkDRJLB3cC3Z/ouXo=",
|
5746
|
+
# code_size: 169,
|
5747
|
+
# location: "https://awslambda-us-west-2-layers.s3.us-west-2.amazonaws.com/snapshots/123456789012/my-layer-4aaa2fbb-ff77-4b0a-ad92-5b78a716a96a?versionId=27iWyA73cCAYqyH...",
|
5748
|
+
# },
|
5749
|
+
# created_date: Time.parse("2018-11-14T23:03:52.894+0000"),
|
5750
|
+
# description: "My Python layer",
|
5751
|
+
# layer_arn: "arn:aws:lambda:us-west-2:123456789012:layer:my-layer",
|
5752
|
+
# layer_version_arn: "arn:aws:lambda:us-west-2:123456789012:layer:my-layer:1",
|
5753
|
+
# license_info: "MIT",
|
5754
|
+
# version: 1,
|
5755
|
+
# }
|
5756
|
+
#
|
4661
5757
|
# @example Request syntax with placeholder values
|
4662
5758
|
#
|
4663
5759
|
# resp = client.publish_layer_version({
|
@@ -4787,6 +5883,46 @@ module Aws::Lambda
|
|
4787
5883
|
# * {Types::FunctionConfiguration#runtime_version_config #runtime_version_config} => Types::RuntimeVersionConfig
|
4788
5884
|
# * {Types::FunctionConfiguration#logging_config #logging_config} => Types::LoggingConfig
|
4789
5885
|
#
|
5886
|
+
#
|
5887
|
+
# @example Example: To publish a version of a Lambda function
|
5888
|
+
#
|
5889
|
+
# # This operation publishes a version of a Lambda function
|
5890
|
+
#
|
5891
|
+
# resp = client.publish_version({
|
5892
|
+
# code_sha_256: "",
|
5893
|
+
# description: "",
|
5894
|
+
# function_name: "myFunction",
|
5895
|
+
# })
|
5896
|
+
#
|
5897
|
+
# resp.to_h outputs the following:
|
5898
|
+
# {
|
5899
|
+
# code_sha_256: "YFgDgEKG3ugvF1+pX64gV6tu9qNuIYNUdgJm8nCxsm4=",
|
5900
|
+
# code_size: 5797206,
|
5901
|
+
# description: "Process image objects from Amazon S3.",
|
5902
|
+
# environment: {
|
5903
|
+
# variables: {
|
5904
|
+
# "BUCKET" => "my-bucket-1xpuxmplzrlbh",
|
5905
|
+
# "PREFIX" => "inbound",
|
5906
|
+
# },
|
5907
|
+
# },
|
5908
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
5909
|
+
# function_name: "my-function",
|
5910
|
+
# handler: "index.handler",
|
5911
|
+
# kms_key_arn: "arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966",
|
5912
|
+
# last_modified: Time.parse("2020-04-10T19:06:32.563+0000"),
|
5913
|
+
# last_update_status: "Successful",
|
5914
|
+
# memory_size: 256,
|
5915
|
+
# revision_id: "b75dcd81-xmpl-48a8-a75a-93ba8b5b9727",
|
5916
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
5917
|
+
# runtime: "nodejs12.x",
|
5918
|
+
# state: "Active",
|
5919
|
+
# timeout: 5,
|
5920
|
+
# tracing_config: {
|
5921
|
+
# mode: "Active",
|
5922
|
+
# },
|
5923
|
+
# version: "1",
|
5924
|
+
# }
|
5925
|
+
#
|
4790
5926
|
# @example Request syntax with placeholder values
|
4791
5927
|
#
|
4792
5928
|
# resp = client.publish_version({
|
@@ -4960,6 +6096,21 @@ module Aws::Lambda
|
|
4960
6096
|
#
|
4961
6097
|
# * {Types::Concurrency#reserved_concurrent_executions #reserved_concurrent_executions} => Integer
|
4962
6098
|
#
|
6099
|
+
#
|
6100
|
+
# @example Example: To configure a reserved concurrency limit for a function
|
6101
|
+
#
|
6102
|
+
# # The following example configures 100 reserved concurrent executions for the my-function function.
|
6103
|
+
#
|
6104
|
+
# resp = client.put_function_concurrency({
|
6105
|
+
# function_name: "my-function",
|
6106
|
+
# reserved_concurrent_executions: 100,
|
6107
|
+
# })
|
6108
|
+
#
|
6109
|
+
# resp.to_h outputs the following:
|
6110
|
+
# {
|
6111
|
+
# reserved_concurrent_executions: 100,
|
6112
|
+
# }
|
6113
|
+
#
|
4963
6114
|
# @example Request syntax with placeholder values
|
4964
6115
|
#
|
4965
6116
|
# resp = client.put_function_concurrency({
|
@@ -5055,6 +6206,31 @@ module Aws::Lambda
|
|
5055
6206
|
# * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
|
5056
6207
|
# * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
|
5057
6208
|
#
|
6209
|
+
#
|
6210
|
+
# @example Example: To configure error handling for asynchronous invocation
|
6211
|
+
#
|
6212
|
+
# # The following example sets a maximum event age of one hour and disables retries for the specified function.
|
6213
|
+
#
|
6214
|
+
# resp = client.put_function_event_invoke_config({
|
6215
|
+
# function_name: "my-function",
|
6216
|
+
# maximum_event_age_in_seconds: 3600,
|
6217
|
+
# maximum_retry_attempts: 0,
|
6218
|
+
# })
|
6219
|
+
#
|
6220
|
+
# resp.to_h outputs the following:
|
6221
|
+
# {
|
6222
|
+
# destination_config: {
|
6223
|
+
# on_failure: {
|
6224
|
+
# },
|
6225
|
+
# on_success: {
|
6226
|
+
# },
|
6227
|
+
# },
|
6228
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
|
6229
|
+
# last_modified: Time.parse("${timestamp}"),
|
6230
|
+
# maximum_event_age_in_seconds: 3600,
|
6231
|
+
# maximum_retry_attempts: 0,
|
6232
|
+
# }
|
6233
|
+
#
|
5058
6234
|
# @example Request syntax with placeholder values
|
5059
6235
|
#
|
5060
6236
|
# resp = client.put_function_event_invoke_config({
|
@@ -5209,6 +6385,25 @@ module Aws::Lambda
|
|
5209
6385
|
# * {Types::PutProvisionedConcurrencyConfigResponse#status_reason #status_reason} => String
|
5210
6386
|
# * {Types::PutProvisionedConcurrencyConfigResponse#last_modified #last_modified} => Time
|
5211
6387
|
#
|
6388
|
+
#
|
6389
|
+
# @example Example: To allocate provisioned concurrency
|
6390
|
+
#
|
6391
|
+
# # The following example allocates 100 provisioned concurrency for the BLUE alias of the specified function.
|
6392
|
+
#
|
6393
|
+
# resp = client.put_provisioned_concurrency_config({
|
6394
|
+
# function_name: "my-function",
|
6395
|
+
# provisioned_concurrent_executions: 100,
|
6396
|
+
# qualifier: "BLUE",
|
6397
|
+
# })
|
6398
|
+
#
|
6399
|
+
# resp.to_h outputs the following:
|
6400
|
+
# {
|
6401
|
+
# allocated_provisioned_concurrent_executions: 0,
|
6402
|
+
# last_modified: Time.parse("2019-11-21T19:32:12+0000"),
|
6403
|
+
# requested_provisioned_concurrent_executions: 100,
|
6404
|
+
# status: "IN_PROGRESS",
|
6405
|
+
# }
|
6406
|
+
#
|
5212
6407
|
# @example Request syntax with placeholder values
|
5213
6408
|
#
|
5214
6409
|
# resp = client.put_provisioned_concurrency_config({
|
@@ -5235,6 +6430,148 @@ module Aws::Lambda
|
|
5235
6430
|
req.send_request(options)
|
5236
6431
|
end
|
5237
6432
|
|
6433
|
+
# <note markdown="1"> The option to configure public-access settings, and to use the
|
6434
|
+
# PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be
|
6435
|
+
# available in all Amazon Web Services Regions until September 30, 2024.
|
6436
|
+
#
|
6437
|
+
# </note>
|
6438
|
+
#
|
6439
|
+
# Configure your function's public-access settings.
|
6440
|
+
#
|
6441
|
+
# To control public access to a Lambda function, you can choose whether
|
6442
|
+
# to allow the creation of [resource-based policies][1] that allow
|
6443
|
+
# public access to that function. You can also block public access to a
|
6444
|
+
# function, even if it has an existing resource-based policy that allows
|
6445
|
+
# it.
|
6446
|
+
#
|
6447
|
+
#
|
6448
|
+
#
|
6449
|
+
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
|
6450
|
+
#
|
6451
|
+
# @option params [required, String] :resource_arn
|
6452
|
+
# The Amazon Resource Name (ARN) of the function you want to configure
|
6453
|
+
# public-access settings for. Public-access settings are applied at the
|
6454
|
+
# function level, so you can't apply different settings to function
|
6455
|
+
# versions or aliases.
|
6456
|
+
#
|
6457
|
+
# @option params [required, Types::PublicAccessBlockConfig] :public_access_block_config
|
6458
|
+
# An object defining the public-access settings you want to apply.
|
6459
|
+
#
|
6460
|
+
# To block the creation of resource-based policies that would grant
|
6461
|
+
# public access to your function, set `BlockPublicPolicy` to `true`. To
|
6462
|
+
# allow the creation of resource-based policies that would grant public
|
6463
|
+
# access to your function, set `BlockPublicPolicy` to `false`.
|
6464
|
+
#
|
6465
|
+
# To block public access to your function, even if its resource-based
|
6466
|
+
# policy allows it, set `RestrictPublicResource` to `true`. To allow
|
6467
|
+
# public access to a function with a resource-based policy that permits
|
6468
|
+
# it, set `RestrictPublicResource` to `false`.
|
6469
|
+
#
|
6470
|
+
# The default setting for both `BlockPublicPolicy` and
|
6471
|
+
# `RestrictPublicResource` is `true`.
|
6472
|
+
#
|
6473
|
+
# @return [Types::PutPublicAccessBlockConfigResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
6474
|
+
#
|
6475
|
+
# * {Types::PutPublicAccessBlockConfigResponse#public_access_block_config #public_access_block_config} => Types::PublicAccessBlockConfig
|
6476
|
+
#
|
6477
|
+
# @example Request syntax with placeholder values
|
6478
|
+
#
|
6479
|
+
# resp = client.put_public_access_block_config({
|
6480
|
+
# resource_arn: "PublicAccessBlockResourceArn", # required
|
6481
|
+
# public_access_block_config: { # required
|
6482
|
+
# block_public_policy: false,
|
6483
|
+
# restrict_public_resource: false,
|
6484
|
+
# },
|
6485
|
+
# })
|
6486
|
+
#
|
6487
|
+
# @example Response structure
|
6488
|
+
#
|
6489
|
+
# resp.public_access_block_config.block_public_policy #=> Boolean
|
6490
|
+
# resp.public_access_block_config.restrict_public_resource #=> Boolean
|
6491
|
+
#
|
6492
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutPublicAccessBlockConfig AWS API Documentation
|
6493
|
+
#
|
6494
|
+
# @overload put_public_access_block_config(params = {})
|
6495
|
+
# @param [Hash] params ({})
|
6496
|
+
def put_public_access_block_config(params = {}, options = {})
|
6497
|
+
req = build_request(:put_public_access_block_config, params)
|
6498
|
+
req.send_request(options)
|
6499
|
+
end
|
6500
|
+
|
6501
|
+
# <note markdown="1"> The option to create and modify full JSON resource-based policies, and
|
6502
|
+
# to use the PutResourcePolicy, GetResourcePolicy, and
|
6503
|
+
# DeleteResourcePolicy APIs, won't be available in all Amazon Web
|
6504
|
+
# Services Regions until September 30, 2024.
|
6505
|
+
#
|
6506
|
+
# </note>
|
6507
|
+
#
|
6508
|
+
# Adds a [resource-based policy][1] to a function. You can use
|
6509
|
+
# resource-based policies to grant access to other [Amazon Web Services
|
6510
|
+
# accounts][2], [organizations][3], or [services][4]. Resource-based
|
6511
|
+
# policies apply to a single function, version, or alias.
|
6512
|
+
#
|
6513
|
+
# Adding a resource-based policy using this API action replaces any
|
6514
|
+
# existing policy you've previously created. This means that if you've
|
6515
|
+
# previously added resource-based permissions to a function using the
|
6516
|
+
# AddPermission action, those permissions will be overwritten by your
|
6517
|
+
# new policy.
|
6518
|
+
#
|
6519
|
+
#
|
6520
|
+
#
|
6521
|
+
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
|
6522
|
+
# [2]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-cross-account.html
|
6523
|
+
# [3]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-organization.html
|
6524
|
+
# [4]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html
|
6525
|
+
#
|
6526
|
+
# @option params [required, String] :resource_arn
|
6527
|
+
# The Amazon Resource Name (ARN) of the function you want to add the
|
6528
|
+
# policy to. You can use either a qualified or an unqualified ARN, but
|
6529
|
+
# the value you specify must be a complete ARN and wildcard characters
|
6530
|
+
# are not accepted.
|
6531
|
+
#
|
6532
|
+
# @option params [required, String] :policy
|
6533
|
+
# The JSON resource-based policy you want to add to your function.
|
6534
|
+
#
|
6535
|
+
# To learn more about creating resource-based policies for controlling
|
6536
|
+
# access to Lambda, see [Working with resource-based IAM policies in
|
6537
|
+
# Lambda][1] in the *Lambda Developer Guide*.
|
6538
|
+
#
|
6539
|
+
#
|
6540
|
+
#
|
6541
|
+
# [1]: https://docs.aws.amazon.com/
|
6542
|
+
#
|
6543
|
+
# @option params [String] :revision_id
|
6544
|
+
# Replace the existing policy only if its revision ID matches the string
|
6545
|
+
# you specify. To find the revision ID of the policy currently attached
|
6546
|
+
# to your function, use the GetResourcePolicy action.
|
6547
|
+
#
|
6548
|
+
# @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
6549
|
+
#
|
6550
|
+
# * {Types::PutResourcePolicyResponse#policy #policy} => String
|
6551
|
+
# * {Types::PutResourcePolicyResponse#revision_id #revision_id} => String
|
6552
|
+
#
|
6553
|
+
# @example Request syntax with placeholder values
|
6554
|
+
#
|
6555
|
+
# resp = client.put_resource_policy({
|
6556
|
+
# resource_arn: "PolicyResourceArn", # required
|
6557
|
+
# policy: "ResourcePolicy", # required
|
6558
|
+
# revision_id: "RevisionId",
|
6559
|
+
# })
|
6560
|
+
#
|
6561
|
+
# @example Response structure
|
6562
|
+
#
|
6563
|
+
# resp.policy #=> String
|
6564
|
+
# resp.revision_id #=> String
|
6565
|
+
#
|
6566
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutResourcePolicy AWS API Documentation
|
6567
|
+
#
|
6568
|
+
# @overload put_resource_policy(params = {})
|
6569
|
+
# @param [Hash] params ({})
|
6570
|
+
def put_resource_policy(params = {}, options = {})
|
6571
|
+
req = build_request(:put_resource_policy, params)
|
6572
|
+
req.send_request(options)
|
6573
|
+
end
|
6574
|
+
|
5238
6575
|
# Sets the runtime management configuration for a function's version.
|
5239
6576
|
# For more information, see [Runtime updates][1].
|
5240
6577
|
#
|
@@ -5352,6 +6689,17 @@ module Aws::Lambda
|
|
5352
6689
|
#
|
5353
6690
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5354
6691
|
#
|
6692
|
+
#
|
6693
|
+
# @example Example: To delete layer-version permissions
|
6694
|
+
#
|
6695
|
+
# # The following example deletes permission for an account to configure a layer version.
|
6696
|
+
#
|
6697
|
+
# resp = client.remove_layer_version_permission({
|
6698
|
+
# layer_name: "my-layer",
|
6699
|
+
# statement_id: "xaccount",
|
6700
|
+
# version_number: 1,
|
6701
|
+
# })
|
6702
|
+
#
|
5355
6703
|
# @example Request syntax with placeholder values
|
5356
6704
|
#
|
5357
6705
|
# resp = client.remove_layer_version_permission({
|
@@ -5405,6 +6753,18 @@ module Aws::Lambda
|
|
5405
6753
|
#
|
5406
6754
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5407
6755
|
#
|
6756
|
+
#
|
6757
|
+
# @example Example: To remove a Lambda function's permissions
|
6758
|
+
#
|
6759
|
+
# # The following example removes a permissions statement named xaccount from the PROD alias of a function named
|
6760
|
+
# # my-function.
|
6761
|
+
#
|
6762
|
+
# resp = client.remove_permission({
|
6763
|
+
# function_name: "my-function",
|
6764
|
+
# qualifier: "PROD",
|
6765
|
+
# statement_id: "xaccount",
|
6766
|
+
# })
|
6767
|
+
#
|
5408
6768
|
# @example Request syntax with placeholder values
|
5409
6769
|
#
|
5410
6770
|
# resp = client.remove_permission({
|
@@ -5423,24 +6783,38 @@ module Aws::Lambda
|
|
5423
6783
|
req.send_request(options)
|
5424
6784
|
end
|
5425
6785
|
|
5426
|
-
# Adds [tags][1] to a function
|
6786
|
+
# Adds [tags][1] to a function, event source mapping, or code signing
|
6787
|
+
# configuration.
|
5427
6788
|
#
|
5428
6789
|
#
|
5429
6790
|
#
|
5430
6791
|
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
|
5431
6792
|
#
|
5432
6793
|
# @option params [required, String] :resource
|
5433
|
-
# The
|
6794
|
+
# The resource's Amazon Resource Name (ARN).
|
5434
6795
|
#
|
5435
6796
|
# @option params [required, Hash<String,String>] :tags
|
5436
|
-
# A list of tags to apply to the
|
6797
|
+
# A list of tags to apply to the resource.
|
5437
6798
|
#
|
5438
6799
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5439
6800
|
#
|
6801
|
+
#
|
6802
|
+
# @example Example: To add tags to an existing Lambda function
|
6803
|
+
#
|
6804
|
+
# # The following example adds a tag with the key name DEPARTMENT and a value of 'Department A' to the specified Lambda
|
6805
|
+
# # function.
|
6806
|
+
#
|
6807
|
+
# resp = client.tag_resource({
|
6808
|
+
# resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
6809
|
+
# tags: {
|
6810
|
+
# "DEPARTMENT" => "Department A",
|
6811
|
+
# },
|
6812
|
+
# })
|
6813
|
+
#
|
5440
6814
|
# @example Request syntax with placeholder values
|
5441
6815
|
#
|
5442
6816
|
# resp = client.tag_resource({
|
5443
|
-
# resource: "
|
6817
|
+
# resource: "TaggableResource", # required
|
5444
6818
|
# tags: { # required
|
5445
6819
|
# "TagKey" => "TagValue",
|
5446
6820
|
# },
|
@@ -5455,24 +6829,37 @@ module Aws::Lambda
|
|
5455
6829
|
req.send_request(options)
|
5456
6830
|
end
|
5457
6831
|
|
5458
|
-
# Removes [tags][1] from a function
|
6832
|
+
# Removes [tags][1] from a function, event source mapping, or code
|
6833
|
+
# signing configuration.
|
5459
6834
|
#
|
5460
6835
|
#
|
5461
6836
|
#
|
5462
6837
|
# [1]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
|
5463
6838
|
#
|
5464
6839
|
# @option params [required, String] :resource
|
5465
|
-
# The
|
6840
|
+
# The resource's Amazon Resource Name (ARN).
|
5466
6841
|
#
|
5467
6842
|
# @option params [required, Array<String>] :tag_keys
|
5468
|
-
# A list of tag keys to remove from the
|
6843
|
+
# A list of tag keys to remove from the resource.
|
5469
6844
|
#
|
5470
6845
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5471
6846
|
#
|
6847
|
+
#
|
6848
|
+
# @example Example: To remove tags from an existing Lambda function
|
6849
|
+
#
|
6850
|
+
# # The following example removes the tag with the key name DEPARTMENT tag from the my-function Lambda function.
|
6851
|
+
#
|
6852
|
+
# resp = client.untag_resource({
|
6853
|
+
# resource: "arn:aws:lambda:us-west-2:123456789012:function:my-function",
|
6854
|
+
# tag_keys: [
|
6855
|
+
# "DEPARTMENT",
|
6856
|
+
# ],
|
6857
|
+
# })
|
6858
|
+
#
|
5472
6859
|
# @example Request syntax with placeholder values
|
5473
6860
|
#
|
5474
6861
|
# resp = client.untag_resource({
|
5475
|
-
# resource: "
|
6862
|
+
# resource: "TaggableResource", # required
|
5476
6863
|
# tag_keys: ["TagKey"], # required
|
5477
6864
|
# })
|
5478
6865
|
#
|
@@ -5536,6 +6923,36 @@ module Aws::Lambda
|
|
5536
6923
|
# * {Types::AliasConfiguration#routing_config #routing_config} => Types::AliasRoutingConfiguration
|
5537
6924
|
# * {Types::AliasConfiguration#revision_id #revision_id} => String
|
5538
6925
|
#
|
6926
|
+
#
|
6927
|
+
# @example Example: To update a function alias
|
6928
|
+
#
|
6929
|
+
# # The following example updates the alias named BLUE to send 30% of traffic to version 2 and 70% to version 1.
|
6930
|
+
#
|
6931
|
+
# resp = client.update_alias({
|
6932
|
+
# function_name: "my-function",
|
6933
|
+
# function_version: "2",
|
6934
|
+
# name: "BLUE",
|
6935
|
+
# routing_config: {
|
6936
|
+
# additional_version_weights: {
|
6937
|
+
# "1" => 0.7,
|
6938
|
+
# },
|
6939
|
+
# },
|
6940
|
+
# })
|
6941
|
+
#
|
6942
|
+
# resp.to_h outputs the following:
|
6943
|
+
# {
|
6944
|
+
# alias_arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function:BLUE",
|
6945
|
+
# description: "Production environment BLUE.",
|
6946
|
+
# function_version: "2",
|
6947
|
+
# name: "BLUE",
|
6948
|
+
# revision_id: "594f41fb-xmpl-4c20-95c7-6ca5f2a92c93",
|
6949
|
+
# routing_config: {
|
6950
|
+
# additional_version_weights: {
|
6951
|
+
# "1" => 0.7,
|
6952
|
+
# },
|
6953
|
+
# },
|
6954
|
+
# }
|
6955
|
+
#
|
5539
6956
|
# @example Request syntax with placeholder values
|
5540
6957
|
#
|
5541
6958
|
# resp = client.update_alias({
|
@@ -5863,6 +7280,31 @@ module Aws::Lambda
|
|
5863
7280
|
# * {Types::EventSourceMappingConfiguration#document_db_event_source_config #document_db_event_source_config} => Types::DocumentDBEventSourceConfig
|
5864
7281
|
# * {Types::EventSourceMappingConfiguration#kms_key_arn #kms_key_arn} => String
|
5865
7282
|
# * {Types::EventSourceMappingConfiguration#filter_criteria_error #filter_criteria_error} => Types::FilterCriteriaError
|
7283
|
+
# * {Types::EventSourceMappingConfiguration#event_source_mapping_arn #event_source_mapping_arn} => String
|
7284
|
+
#
|
7285
|
+
#
|
7286
|
+
# @example Example: To update a Lambda function event source mapping
|
7287
|
+
#
|
7288
|
+
# # This operation updates a Lambda function event source mapping
|
7289
|
+
#
|
7290
|
+
# resp = client.update_event_source_mapping({
|
7291
|
+
# batch_size: 123,
|
7292
|
+
# enabled: true,
|
7293
|
+
# function_name: "myFunction",
|
7294
|
+
# uuid: "1234xCy789012",
|
7295
|
+
# })
|
7296
|
+
#
|
7297
|
+
# resp.to_h outputs the following:
|
7298
|
+
# {
|
7299
|
+
# batch_size: 123,
|
7300
|
+
# event_source_arn: "arn:aws:s3:::examplebucket/*",
|
7301
|
+
# function_arn: "arn:aws:lambda:us-west-2:123456789012:function:myFunction",
|
7302
|
+
# last_modified: Time.parse("2016-11-21T19:49:20.006+0000"),
|
7303
|
+
# last_processing_result: "",
|
7304
|
+
# state: "",
|
7305
|
+
# state_transition_reason: "",
|
7306
|
+
# uuid: "1234xCy789012",
|
7307
|
+
# }
|
5866
7308
|
#
|
5867
7309
|
# @example Request syntax with placeholder values
|
5868
7310
|
#
|
@@ -5953,6 +7395,7 @@ module Aws::Lambda
|
|
5953
7395
|
# resp.kms_key_arn #=> String
|
5954
7396
|
# resp.filter_criteria_error.error_code #=> String
|
5955
7397
|
# resp.filter_criteria_error.message #=> String
|
7398
|
+
# resp.event_source_mapping_arn #=> String
|
5956
7399
|
#
|
5957
7400
|
# @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping AWS API Documentation
|
5958
7401
|
#
|
@@ -6090,6 +7533,38 @@ module Aws::Lambda
|
|
6090
7533
|
# * {Types::FunctionConfiguration#runtime_version_config #runtime_version_config} => Types::RuntimeVersionConfig
|
6091
7534
|
# * {Types::FunctionConfiguration#logging_config #logging_config} => Types::LoggingConfig
|
6092
7535
|
#
|
7536
|
+
#
|
7537
|
+
# @example Example: To update a Lambda function's code
|
7538
|
+
#
|
7539
|
+
# # The following example replaces the code of the unpublished ($LATEST) version of a function named my-function with the
|
7540
|
+
# # contents of the specified zip file in Amazon S3.
|
7541
|
+
#
|
7542
|
+
# resp = client.update_function_code({
|
7543
|
+
# function_name: "my-function",
|
7544
|
+
# s3_bucket: "my-bucket-1xpuxmplzrlbh",
|
7545
|
+
# s3_key: "function.zip",
|
7546
|
+
# })
|
7547
|
+
#
|
7548
|
+
# resp.to_h outputs the following:
|
7549
|
+
# {
|
7550
|
+
# code_sha_256: "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
|
7551
|
+
# code_size: 308,
|
7552
|
+
# description: "",
|
7553
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
|
7554
|
+
# function_name: "my-function",
|
7555
|
+
# handler: "index.handler",
|
7556
|
+
# last_modified: Time.parse("2019-08-14T22:26:11.234+0000"),
|
7557
|
+
# memory_size: 128,
|
7558
|
+
# revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
|
7559
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
7560
|
+
# runtime: "nodejs12.x",
|
7561
|
+
# timeout: 3,
|
7562
|
+
# tracing_config: {
|
7563
|
+
# mode: "PassThrough",
|
7564
|
+
# },
|
7565
|
+
# version: "$LATEST",
|
7566
|
+
# }
|
7567
|
+
#
|
6093
7568
|
# @example Request syntax with placeholder values
|
6094
7569
|
#
|
6095
7570
|
# resp = client.update_function_code({
|
@@ -6405,6 +7880,37 @@ module Aws::Lambda
|
|
6405
7880
|
# * {Types::FunctionConfiguration#runtime_version_config #runtime_version_config} => Types::RuntimeVersionConfig
|
6406
7881
|
# * {Types::FunctionConfiguration#logging_config #logging_config} => Types::LoggingConfig
|
6407
7882
|
#
|
7883
|
+
#
|
7884
|
+
# @example Example: To update a Lambda function's configuration
|
7885
|
+
#
|
7886
|
+
# # The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named
|
7887
|
+
# # my-function.
|
7888
|
+
#
|
7889
|
+
# resp = client.update_function_configuration({
|
7890
|
+
# function_name: "my-function",
|
7891
|
+
# memory_size: 256,
|
7892
|
+
# })
|
7893
|
+
#
|
7894
|
+
# resp.to_h outputs the following:
|
7895
|
+
# {
|
7896
|
+
# code_sha_256: "PFn4S+er27qk+UuZSTKEQfNKG/XNn7QJs90mJgq6oH8=",
|
7897
|
+
# code_size: 308,
|
7898
|
+
# description: "",
|
7899
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
|
7900
|
+
# function_name: "my-function",
|
7901
|
+
# handler: "index.handler",
|
7902
|
+
# last_modified: Time.parse("2019-08-14T22:26:11.234+0000"),
|
7903
|
+
# memory_size: 256,
|
7904
|
+
# revision_id: "873282ed-xmpl-4dc8-a069-d0c647e470c6",
|
7905
|
+
# role: "arn:aws:iam::123456789012:role/lambda-role",
|
7906
|
+
# runtime: "nodejs12.x",
|
7907
|
+
# timeout: 3,
|
7908
|
+
# tracing_config: {
|
7909
|
+
# mode: "PassThrough",
|
7910
|
+
# },
|
7911
|
+
# version: "$LATEST",
|
7912
|
+
# }
|
7913
|
+
#
|
6408
7914
|
# @example Request syntax with placeholder values
|
6409
7915
|
#
|
6410
7916
|
# resp = client.update_function_configuration({
|
@@ -6590,6 +8096,36 @@ module Aws::Lambda
|
|
6590
8096
|
# * {Types::FunctionEventInvokeConfig#maximum_event_age_in_seconds #maximum_event_age_in_seconds} => Integer
|
6591
8097
|
# * {Types::FunctionEventInvokeConfig#destination_config #destination_config} => Types::DestinationConfig
|
6592
8098
|
#
|
8099
|
+
#
|
8100
|
+
# @example Example: To update an asynchronous invocation configuration
|
8101
|
+
#
|
8102
|
+
# # The following example adds an on-failure destination to the existing asynchronous invocation configuration for a
|
8103
|
+
# # function named my-function.
|
8104
|
+
#
|
8105
|
+
# resp = client.update_function_event_invoke_config({
|
8106
|
+
# destination_config: {
|
8107
|
+
# on_failure: {
|
8108
|
+
# destination: "arn:aws:sqs:us-east-2:123456789012:destination",
|
8109
|
+
# },
|
8110
|
+
# },
|
8111
|
+
# function_name: "my-function",
|
8112
|
+
# })
|
8113
|
+
#
|
8114
|
+
# resp.to_h outputs the following:
|
8115
|
+
# {
|
8116
|
+
# destination_config: {
|
8117
|
+
# on_failure: {
|
8118
|
+
# destination: "arn:aws:sqs:us-east-2:123456789012:destination",
|
8119
|
+
# },
|
8120
|
+
# on_success: {
|
8121
|
+
# },
|
8122
|
+
# },
|
8123
|
+
# function_arn: "arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST",
|
8124
|
+
# last_modified: Time.parse(1573687896.493),
|
8125
|
+
# maximum_event_age_in_seconds: 3600,
|
8126
|
+
# maximum_retry_attempts: 0,
|
8127
|
+
# }
|
8128
|
+
#
|
6593
8129
|
# @example Request syntax with placeholder values
|
6594
8130
|
#
|
6595
8131
|
# resp = client.update_function_event_invoke_config({
|
@@ -6755,7 +8291,7 @@ module Aws::Lambda
|
|
6755
8291
|
tracer: tracer
|
6756
8292
|
)
|
6757
8293
|
context[:gem_name] = 'aws-sdk-lambda'
|
6758
|
-
context[:gem_version] = '1.
|
8294
|
+
context[:gem_version] = '1.132.0'
|
6759
8295
|
Seahorse::Client::Request.new(handlers, context)
|
6760
8296
|
end
|
6761
8297
|
|