Class: Aws::LambdaWeb::Waiters::WebFunctionEndpointActive

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-lambdaweb/lib/aws-sdk-lambdaweb/waiters.rb

Overview

Waits for the web function endpoint's state to be Active. This should be used after new endpoint creation.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ WebFunctionEndpointActive

Returns a new instance of WebFunctionEndpointActive.

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 300
  • :delay (Integer) — default: 1
  • :before_attempt (Proc)
  • :before_wait (Proc)


191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'gems/aws-sdk-lambdaweb/lib/aws-sdk-lambdaweb/waiters.rb', line 191

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 300,
    delay: 1,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_web_function_endpoint,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "state",
          "state" => "success",
          "expected" => "Active"
        },
        {
          "matcher" => "path",
          "argument" => "state",
          "state" => "failure",
          "expected" => "Failed"
        },
        {
          "matcher" => "path",
          "argument" => "state",
          "state" => "failure",
          "expected" => "Deleting"
        },
        {
          "matcher" => "path",
          "argument" => "state",
          "state" => "retry",
          "expected" => "Pending"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetWebFunctionEndpointResponse

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {}) —

    a customizable set of options

Options Hash (params):

  • :function_name (required, String) —

    The web function.

    You can specify either of the following:

    • The function name, for example my-function.

    • The function ARN.

    The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

  • :endpoint_name (required, String) —

    The endpoint to retrieve.

    You can specify either of the following:

    • The endpoint name, for example my-endpoint.

    • The endpoint ARN.

    The length constraint applies only to the full ARN. If you specify only the endpoint name, it is limited to 64 characters in length.

Returns:



230
231
232
# File 'gems/aws-sdk-lambdaweb/lib/aws-sdk-lambdaweb/waiters.rb', line 230

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end