Class: Aws::Lambda::Waiters::FunctionActiveV2
- Inherits:
-
Object
- Object
- Aws::Lambda::Waiters::FunctionActiveV2
- Defined in:
- lib/aws-sdk-lambda/waiters.rb
Overview
Waits for the function’s State to be Active. This waiter uses GetFunction API. This should be used after new function creation.
Instance Attribute Summary collapse
- #waiter ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(options) ⇒ FunctionActiveV2
constructor
A new instance of FunctionActiveV2.
-
#wait(params = {}) ⇒ Types::GetFunctionResponse
Returns a response object which responds to the following methods:.
Constructor Details
#initialize(options) ⇒ FunctionActiveV2
Returns a new instance of FunctionActiveV2.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/aws-sdk-lambda/waiters.rb', line 141 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 300, delay: 1, poller: Aws::Waiters::Poller.new( operation_name: :get_function, acceptors: [ { "state" => "success", "matcher" => "path", "argument" => "configuration.state", "expected" => "Active" }, { "state" => "failure", "matcher" => "path", "argument" => "configuration.state", "expected" => "Failed" }, { "state" => "retry", "matcher" => "path", "argument" => "configuration.state", "expected" => "Pending" } ] ) }.merge()) end |
Instance Attribute Details
#waiter ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
179 180 181 |
# File 'lib/aws-sdk-lambda/waiters.rb', line 179 def waiter @waiter end |
Instance Method Details
#wait(params = {}) ⇒ Types::GetFunctionResponse
Returns a response object which responds to the following methods:
-
#configuration => Types::FunctionConfiguration
-
#code => Types::FunctionCodeLocation
-
#tags => Hash<String,String>
-
#concurrency => Types::Concurrency
174 175 176 |
# File 'lib/aws-sdk-lambda/waiters.rb', line 174 def wait(params = {}) @waiter.wait(client: @client, params: params) end |