aws-sdk-lambda 1.32.0 → 1.33.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,57 @@ require 'aws-sdk-core/waiters'
10
10
  module Aws::Lambda
11
11
  module Waiters
12
12
 
13
+ # Waits for the function's State to be Active.
14
+ class FunctionActive
15
+
16
+ # @param [Hash] options
17
+ # @option options [required, Client] :client
18
+ # @option options [Integer] :max_attempts (60)
19
+ # @option options [Integer] :delay (5)
20
+ # @option options [Proc] :before_attempt
21
+ # @option options [Proc] :before_wait
22
+ def initialize(options)
23
+ @client = options.fetch(:client)
24
+ @waiter = Aws::Waiters::Waiter.new({
25
+ max_attempts: 60,
26
+ delay: 5,
27
+ poller: Aws::Waiters::Poller.new(
28
+ operation_name: :get_function_configuration,
29
+ acceptors: [
30
+ {
31
+ "state" => "success",
32
+ "matcher" => "path",
33
+ "argument" => "state",
34
+ "expected" => "Active"
35
+ },
36
+ {
37
+ "state" => "failure",
38
+ "matcher" => "path",
39
+ "argument" => "state",
40
+ "expected" => "Failed"
41
+ },
42
+ {
43
+ "state" => "retry",
44
+ "matcher" => "path",
45
+ "argument" => "state",
46
+ "expected" => "Pending"
47
+ }
48
+ ]
49
+ )
50
+ }.merge(options))
51
+ end
52
+
53
+ # @option (see Client#get_function_configuration)
54
+ # @return (see Client#get_function_configuration)
55
+ def wait(params = {})
56
+ @waiter.wait(client: @client, params: params)
57
+ end
58
+
59
+ # @api private
60
+ attr_reader :waiter
61
+
62
+ end
63
+
13
64
  class FunctionExists
14
65
 
15
66
  # @param [Hash] options
@@ -51,5 +102,56 @@ module Aws::Lambda
51
102
  attr_reader :waiter
52
103
 
53
104
  end
105
+
106
+ # Waits for the function's LastUpdateStatus to be Successful.
107
+ class FunctionUpdated
108
+
109
+ # @param [Hash] options
110
+ # @option options [required, Client] :client
111
+ # @option options [Integer] :max_attempts (60)
112
+ # @option options [Integer] :delay (5)
113
+ # @option options [Proc] :before_attempt
114
+ # @option options [Proc] :before_wait
115
+ def initialize(options)
116
+ @client = options.fetch(:client)
117
+ @waiter = Aws::Waiters::Waiter.new({
118
+ max_attempts: 60,
119
+ delay: 5,
120
+ poller: Aws::Waiters::Poller.new(
121
+ operation_name: :get_function_configuration,
122
+ acceptors: [
123
+ {
124
+ "state" => "success",
125
+ "matcher" => "path",
126
+ "argument" => "last_update_status",
127
+ "expected" => "Successful"
128
+ },
129
+ {
130
+ "state" => "failure",
131
+ "matcher" => "path",
132
+ "argument" => "last_update_status",
133
+ "expected" => "Failed"
134
+ },
135
+ {
136
+ "state" => "retry",
137
+ "matcher" => "path",
138
+ "argument" => "last_update_status",
139
+ "expected" => "InProgress"
140
+ }
141
+ ]
142
+ )
143
+ }.merge(options))
144
+ end
145
+
146
+ # @option (see Client#get_function_configuration)
147
+ # @return (see Client#get_function_configuration)
148
+ def wait(params = {})
149
+ @waiter.wait(client: @client, params: params)
150
+ end
151
+
152
+ # @api private
153
+ attr_reader :waiter
154
+
155
+ end
54
156
  end
55
157
  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.32.0
4
+ version: 1.33.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-11-19 00:00:00.000000000 Z
11
+ date: 2019-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core