Class: Aws::MediaConnect::Waiters::SourceEndpointConnecting

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

Overview

Wait until the Source Endpoint has begun connecting

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ SourceEndpointConnecting

Returns a new instance of SourceEndpointConnecting.

Parameters:

  • options (Hash)

Options Hash (options):

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


1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/waiters.rb', line 1096

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 40,
    delay: 3,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_source_endpoint,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "source_endpoint.connection_state",
          "state" => "success",
          "expected" => "CONNECTING"
        },
        {
          "matcher" => "path",
          "argument" => "source_endpoint.connection_state",
          "state" => "success",
          "expected" => "CONNECTED"
        },
        {
          "matcher" => "error",
          "state" => "retry",
          "expected" => "InternalServerErrorException"
        },
        {
          "matcher" => "error",
          "state" => "retry",
          "expected" => "ServiceUnavailableException"
        },
        {
          "matcher" => "error",
          "state" => "retry",
          "expected" => "TooManyRequestsException"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :arn (required, String) —

    The Amazon Resource Name (ARN) of the source endpoint to retrieve.

Returns:



1138
1139
1140
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/waiters.rb', line 1138

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