aws-sdk-lambda 1.22.0 → 1.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06afa1fa8c92636bbb9776184ddacece8ab545c6
4
- data.tar.gz: 2825bf75e44e2880800f01e2a56889b75c903c05
3
+ metadata.gz: 4392ceb92a20302d7d44093baca0272d354d18a8
4
+ data.tar.gz: 55985b2235b09dd5414e3c8e469a1a829d8a70e5
5
5
  SHA512:
6
- metadata.gz: 88077fdf0e04716cb1b838a3e9bc22ad28273412bf1abced93532dfdb3374078de696e208a08456a593cdd46d0dd57a9ed2e3b43361cee33c8301f0f2b4fecfb
7
- data.tar.gz: b9bba4eeb1ac5ee566fdcec9517ce442becfe8a6314fde25a591035d11c7b3c7158dc6db11578f01eebceddfcd23ec6e2cee12ed0ef8e925b1d120c0fde40e1e
6
+ metadata.gz: d3e5a3d9fc3c8904e0ac6f65b7915e658d2a553382c192a058e43454081e0eabc6b6cf7a888fab4dffe39f019305634723dddc4fa22529951806a4102401b7d2
7
+ data.tar.gz: 77073d397b584b7ed80ed98beb42c7adcfa458c9dd2a471c14be57fdc724a9e91c079648c4c0d6a57f6fdf5df17ddebea7e8ca5c59d8f312eb7eff58cadff3ee
@@ -12,6 +12,7 @@ require_relative 'aws-sdk-lambda/types'
12
12
  require_relative 'aws-sdk-lambda/client_api'
13
13
  require_relative 'aws-sdk-lambda/client'
14
14
  require_relative 'aws-sdk-lambda/errors'
15
+ require_relative 'aws-sdk-lambda/waiters'
15
16
  require_relative 'aws-sdk-lambda/resource'
16
17
  require_relative 'aws-sdk-lambda/customizations'
17
18
 
@@ -42,6 +43,6 @@ require_relative 'aws-sdk-lambda/customizations'
42
43
  # @service
43
44
  module Aws::Lambda
44
45
 
45
- GEM_VERSION = '1.22.0'
46
+ GEM_VERSION = '1.23.0'
46
47
 
47
48
  end
@@ -842,7 +842,7 @@ module Aws::Lambda
842
842
  #
843
843
  # resp = client.create_function({
844
844
  # function_name: "FunctionName", # required
845
- # runtime: "nodejs", # required, accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
845
+ # runtime: "nodejs", # required, accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
846
846
  # role: "RoleArn", # required
847
847
  # handler: "Handler", # required
848
848
  # code: { # required
@@ -881,7 +881,7 @@ module Aws::Lambda
881
881
  #
882
882
  # resp.function_name #=> String
883
883
  # resp.function_arn #=> String
884
- # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
884
+ # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
885
885
  # resp.role #=> String
886
886
  # resp.handler #=> String
887
887
  # resp.code_size #=> Integer
@@ -1437,7 +1437,7 @@ module Aws::Lambda
1437
1437
  #
1438
1438
  # resp.configuration.function_name #=> String
1439
1439
  # resp.configuration.function_arn #=> String
1440
- # resp.configuration.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1440
+ # resp.configuration.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1441
1441
  # resp.configuration.role #=> String
1442
1442
  # resp.configuration.handler #=> String
1443
1443
  # resp.configuration.code_size #=> Integer
@@ -1574,7 +1574,7 @@ module Aws::Lambda
1574
1574
  #
1575
1575
  # resp.function_name #=> String
1576
1576
  # resp.function_arn #=> String
1577
- # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1577
+ # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1578
1578
  # resp.role #=> String
1579
1579
  # resp.handler #=> String
1580
1580
  # resp.code_size #=> Integer
@@ -1653,7 +1653,7 @@ module Aws::Lambda
1653
1653
  # resp.created_date #=> Time
1654
1654
  # resp.version #=> Integer
1655
1655
  # resp.compatible_runtimes #=> Array
1656
- # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1656
+ # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1657
1657
  # resp.license_info #=> String
1658
1658
  #
1659
1659
  # @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion AWS API Documentation
@@ -1703,7 +1703,7 @@ module Aws::Lambda
1703
1703
  # resp.created_date #=> Time
1704
1704
  # resp.version #=> Integer
1705
1705
  # resp.compatible_runtimes #=> Array
1706
- # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1706
+ # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
1707
1707
  # resp.license_info #=> String
1708
1708
  #
1709
1709
  # @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionByArn AWS API Documentation
@@ -2248,7 +2248,7 @@ module Aws::Lambda
2248
2248
  # resp.functions #=> Array
2249
2249
  # resp.functions[0].function_name #=> String
2250
2250
  # resp.functions[0].function_arn #=> String
2251
- # resp.functions[0].runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2251
+ # resp.functions[0].runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2252
2252
  # resp.functions[0].role #=> String
2253
2253
  # resp.functions[0].handler #=> String
2254
2254
  # resp.functions[0].code_size #=> Integer
@@ -2315,7 +2315,7 @@ module Aws::Lambda
2315
2315
  # @example Request syntax with placeholder values
2316
2316
  #
2317
2317
  # resp = client.list_layer_versions({
2318
- # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2318
+ # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2319
2319
  # layer_name: "LayerName", # required
2320
2320
  # marker: "String",
2321
2321
  # max_items: 1,
@@ -2330,7 +2330,7 @@ module Aws::Lambda
2330
2330
  # resp.layer_versions[0].description #=> String
2331
2331
  # resp.layer_versions[0].created_date #=> Time
2332
2332
  # resp.layer_versions[0].compatible_runtimes #=> Array
2333
- # resp.layer_versions[0].compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2333
+ # resp.layer_versions[0].compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2334
2334
  # resp.layer_versions[0].license_info #=> String
2335
2335
  #
2336
2336
  # @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions AWS API Documentation
@@ -2368,7 +2368,7 @@ module Aws::Lambda
2368
2368
  # @example Request syntax with placeholder values
2369
2369
  #
2370
2370
  # resp = client.list_layers({
2371
- # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2371
+ # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2372
2372
  # marker: "String",
2373
2373
  # max_items: 1,
2374
2374
  # })
@@ -2384,7 +2384,7 @@ module Aws::Lambda
2384
2384
  # resp.layers[0].latest_matching_version.description #=> String
2385
2385
  # resp.layers[0].latest_matching_version.created_date #=> Time
2386
2386
  # resp.layers[0].latest_matching_version.compatible_runtimes #=> Array
2387
- # resp.layers[0].latest_matching_version.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2387
+ # resp.layers[0].latest_matching_version.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2388
2388
  # resp.layers[0].latest_matching_version.license_info #=> String
2389
2389
  #
2390
2390
  # @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers AWS API Documentation
@@ -2496,7 +2496,7 @@ module Aws::Lambda
2496
2496
  # resp.versions #=> Array
2497
2497
  # resp.versions[0].function_name #=> String
2498
2498
  # resp.versions[0].function_arn #=> String
2499
- # resp.versions[0].runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2499
+ # resp.versions[0].runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2500
2500
  # resp.versions[0].role #=> String
2501
2501
  # resp.versions[0].handler #=> String
2502
2502
  # resp.versions[0].code_size #=> Integer
@@ -2597,7 +2597,7 @@ module Aws::Lambda
2597
2597
  # s3_object_version: "S3ObjectVersion",
2598
2598
  # zip_file: "data",
2599
2599
  # },
2600
- # compatible_runtimes: ["nodejs"], # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2600
+ # compatible_runtimes: ["nodejs"], # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2601
2601
  # license_info: "LicenseInfo",
2602
2602
  # })
2603
2603
  #
@@ -2612,7 +2612,7 @@ module Aws::Lambda
2612
2612
  # resp.created_date #=> Time
2613
2613
  # resp.version #=> Integer
2614
2614
  # resp.compatible_runtimes #=> Array
2615
- # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2615
+ # resp.compatible_runtimes[0] #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2616
2616
  # resp.license_info #=> String
2617
2617
  #
2618
2618
  # @see http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion AWS API Documentation
@@ -2736,7 +2736,7 @@ module Aws::Lambda
2736
2736
  #
2737
2737
  # resp.function_name #=> String
2738
2738
  # resp.function_arn #=> String
2739
- # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2739
+ # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
2740
2740
  # resp.role #=> String
2741
2741
  # resp.handler #=> String
2742
2742
  # resp.code_size #=> Integer
@@ -3329,7 +3329,7 @@ module Aws::Lambda
3329
3329
  #
3330
3330
  # resp.function_name #=> String
3331
3331
  # resp.function_arn #=> String
3332
- # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
3332
+ # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
3333
3333
  # resp.role #=> String
3334
3334
  # resp.handler #=> String
3335
3335
  # resp.code_size #=> Integer
@@ -3545,7 +3545,7 @@ module Aws::Lambda
3545
3545
  # "EnvironmentVariableName" => "EnvironmentVariableValue",
3546
3546
  # },
3547
3547
  # },
3548
- # runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
3548
+ # runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
3549
3549
  # dead_letter_config: {
3550
3550
  # target_arn: "ResourceArn",
3551
3551
  # },
@@ -3561,7 +3561,7 @@ module Aws::Lambda
3561
3561
  #
3562
3562
  # resp.function_name #=> String
3563
3563
  # resp.function_arn #=> String
3564
- # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
3564
+ # resp.runtime #=> String, one of "nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "java8", "python2.7", "python3.6", "python3.7", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "nodejs4.3-edge", "go1.x", "ruby2.5", "provided"
3565
3565
  # resp.role #=> String
3566
3566
  # resp.handler #=> String
3567
3567
  # resp.code_size #=> Integer
@@ -3611,14 +3611,127 @@ module Aws::Lambda
3611
3611
  params: params,
3612
3612
  config: config)
3613
3613
  context[:gem_name] = 'aws-sdk-lambda'
3614
- context[:gem_version] = '1.22.0'
3614
+ context[:gem_version] = '1.23.0'
3615
3615
  Seahorse::Client::Request.new(handlers, context)
3616
3616
  end
3617
3617
 
3618
+ # Polls an API operation until a resource enters a desired state.
3619
+ #
3620
+ # ## Basic Usage
3621
+ #
3622
+ # A waiter will call an API operation until:
3623
+ #
3624
+ # * It is successful
3625
+ # * It enters a terminal state
3626
+ # * It makes the maximum number of attempts
3627
+ #
3628
+ # In between attempts, the waiter will sleep.
3629
+ #
3630
+ # # polls in a loop, sleeping between attempts
3631
+ # client.wait_until(waiter_name, params)
3632
+ #
3633
+ # ## Configuration
3634
+ #
3635
+ # You can configure the maximum number of polling attempts, and the
3636
+ # delay (in seconds) between each polling attempt. You can pass
3637
+ # configuration as the final arguments hash.
3638
+ #
3639
+ # # poll for ~25 seconds
3640
+ # client.wait_until(waiter_name, params, {
3641
+ # max_attempts: 5,
3642
+ # delay: 5,
3643
+ # })
3644
+ #
3645
+ # ## Callbacks
3646
+ #
3647
+ # You can be notified before each polling attempt and before each
3648
+ # delay. If you throw `:success` or `:failure` from these callbacks,
3649
+ # it will terminate the waiter.
3650
+ #
3651
+ # started_at = Time.now
3652
+ # client.wait_until(waiter_name, params, {
3653
+ #
3654
+ # # disable max attempts
3655
+ # max_attempts: nil,
3656
+ #
3657
+ # # poll for 1 hour, instead of a number of attempts
3658
+ # before_wait: -> (attempts, response) do
3659
+ # throw :failure if Time.now - started_at > 3600
3660
+ # end
3661
+ # })
3662
+ #
3663
+ # ## Handling Errors
3664
+ #
3665
+ # When a waiter is unsuccessful, it will raise an error.
3666
+ # All of the failure errors extend from
3667
+ # {Aws::Waiters::Errors::WaiterFailed}.
3668
+ #
3669
+ # begin
3670
+ # client.wait_until(...)
3671
+ # rescue Aws::Waiters::Errors::WaiterFailed
3672
+ # # resource did not enter the desired state in time
3673
+ # end
3674
+ #
3675
+ # ## Valid Waiters
3676
+ #
3677
+ # The following table lists the valid waiter names, the operations they call,
3678
+ # and the default `:delay` and `:max_attempts` values.
3679
+ #
3680
+ # | waiter_name | params | :delay | :max_attempts |
3681
+ # | --------------- | --------------- | -------- | ------------- |
3682
+ # | function_exists | {#get_function} | 1 | 20 |
3683
+ #
3684
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
3685
+ # because the waiter has entered a state that it will not transition
3686
+ # out of, preventing success.
3687
+ #
3688
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
3689
+ # maximum number of attempts have been made, and the waiter is not
3690
+ # yet successful.
3691
+ #
3692
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
3693
+ # while polling for a resource that is not expected.
3694
+ #
3695
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
3696
+ # for an unknown state.
3697
+ #
3698
+ # @return [Boolean] Returns `true` if the waiter was successful.
3699
+ # @param [Symbol] waiter_name
3700
+ # @param [Hash] params ({})
3701
+ # @param [Hash] options ({})
3702
+ # @option options [Integer] :max_attempts
3703
+ # @option options [Integer] :delay
3704
+ # @option options [Proc] :before_attempt
3705
+ # @option options [Proc] :before_wait
3706
+ def wait_until(waiter_name, params = {}, options = {})
3707
+ w = waiter(waiter_name, options)
3708
+ yield(w.waiter) if block_given? # deprecated
3709
+ w.wait(params)
3710
+ end
3711
+
3618
3712
  # @api private
3619
3713
  # @deprecated
3620
3714
  def waiter_names
3621
- []
3715
+ waiters.keys
3716
+ end
3717
+
3718
+ private
3719
+
3720
+ # @param [Symbol] waiter_name
3721
+ # @param [Hash] options ({})
3722
+ def waiter(waiter_name, options = {})
3723
+ waiter_class = waiters[waiter_name]
3724
+ if waiter_class
3725
+ waiter_class.new(options.merge(client: self))
3726
+ else
3727
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
3728
+ end
3729
+ end
3730
+
3731
+ def waiters
3732
+ {
3733
+ function_exists: Waiters::FunctionExists
3734
+ }
3622
3735
  end
3623
3736
 
3624
3737
  class << self
@@ -482,7 +482,7 @@ module Aws::Lambda
482
482
  #
483
483
  # {
484
484
  # function_name: "FunctionName", # required
485
- # runtime: "nodejs", # required, accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
485
+ # runtime: "nodejs", # required, accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
486
486
  # role: "RoleArn", # required
487
487
  # handler: "Handler", # required
488
488
  # code: { # required
@@ -2036,7 +2036,7 @@ module Aws::Lambda
2036
2036
  # data as a hash:
2037
2037
  #
2038
2038
  # {
2039
- # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2039
+ # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2040
2040
  # layer_name: "LayerName", # required
2041
2041
  # marker: "String",
2042
2042
  # max_items: 1,
@@ -2089,7 +2089,7 @@ module Aws::Lambda
2089
2089
  # data as a hash:
2090
2090
  #
2091
2091
  # {
2092
- # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2092
+ # compatible_runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2093
2093
  # marker: "String",
2094
2094
  # max_items: 1,
2095
2095
  # }
@@ -2232,7 +2232,7 @@ module Aws::Lambda
2232
2232
  # s3_object_version: "S3ObjectVersion",
2233
2233
  # zip_file: "data",
2234
2234
  # },
2235
- # compatible_runtimes: ["nodejs"], # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2235
+ # compatible_runtimes: ["nodejs"], # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2236
2236
  # license_info: "LicenseInfo",
2237
2237
  # }
2238
2238
  #
@@ -2825,7 +2825,7 @@ module Aws::Lambda
2825
2825
  # "EnvironmentVariableName" => "EnvironmentVariableValue",
2826
2826
  # },
2827
2827
  # },
2828
- # runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2828
+ # runtime: "nodejs", # accepts nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, java8, python2.7, python3.6, python3.7, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, nodejs4.3-edge, go1.x, ruby2.5, provided
2829
2829
  # dead_letter_config: {
2830
2830
  # target_arn: "ResourceArn",
2831
2831
  # },
@@ -0,0 +1,55 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core/waiters'
9
+
10
+ module Aws::Lambda
11
+ module Waiters
12
+
13
+ class FunctionExists
14
+
15
+ # @param [Hash] options
16
+ # @option options [required, Client] :client
17
+ # @option options [Integer] :max_attempts (20)
18
+ # @option options [Integer] :delay (1)
19
+ # @option options [Proc] :before_attempt
20
+ # @option options [Proc] :before_wait
21
+ def initialize(options)
22
+ @client = options.fetch(:client)
23
+ @waiter = Aws::Waiters::Waiter.new({
24
+ max_attempts: 20,
25
+ delay: 1,
26
+ poller: Aws::Waiters::Poller.new(
27
+ operation_name: :get_function,
28
+ acceptors: [
29
+ {
30
+ "state" => "success",
31
+ "matcher" => "status",
32
+ "expected" => 200
33
+ },
34
+ {
35
+ "state" => "retry",
36
+ "matcher" => "error",
37
+ "expected" => "ResourceNotFoundException"
38
+ }
39
+ ]
40
+ )
41
+ }.merge(options))
42
+ end
43
+
44
+ # @option (see Client#get_function)
45
+ # @return (see Client#get_function)
46
+ def wait(params = {})
47
+ @waiter.wait(client: @client, params: params)
48
+ end
49
+
50
+ # @api private
51
+ attr_reader :waiter
52
+
53
+ end
54
+ end
55
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-lambda
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.22.0
4
+ version: 1.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -59,6 +59,7 @@ files:
59
59
  - lib/aws-sdk-lambda/errors.rb
60
60
  - lib/aws-sdk-lambda/resource.rb
61
61
  - lib/aws-sdk-lambda/types.rb
62
+ - lib/aws-sdk-lambda/waiters.rb
62
63
  homepage: https://github.com/aws/aws-sdk-ruby
63
64
  licenses:
64
65
  - Apache-2.0