Class: Aws::MediaLive::Waiters::NodeRegistered

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

Overview

Wait until a node has been registered

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ NodeRegistered

Returns a new instance of NodeRegistered.

Parameters:

  • options (Hash)

Options Hash (options):

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


986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/aws-sdk-medialive/waiters.rb', line 986

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 5,
    delay: 3,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_node,
      acceptors: [
        {
          "state" => "success",
          "matcher" => "path",
          "argument" => "state",
          "expected" => "ACTIVE"
        },
        {
          "state" => "retry",
          "matcher" => "path",
          "argument" => "state",
          "expected" => "REGISTERING"
        },
        {
          "state" => "retry",
          "matcher" => "status",
          "expected" => 404
        },
        {
          "state" => "failure",
          "matcher" => "path",
          "argument" => "state",
          "expected" => "REGISTRATION_FAILED"
        },
        {
          "state" => "retry",
          "matcher" => "status",
          "expected" => 500
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (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.



1034
1035
1036
# File 'lib/aws-sdk-medialive/waiters.rb', line 1034

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :cluster_id (required, String)
  • :node_id (required, String)

Returns:



1029
1030
1031
# File 'lib/aws-sdk-medialive/waiters.rb', line 1029

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