Class: Aws::GameLiftStreams::Waiters::StreamSessionActive

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

Overview

Waits until a stream session is active

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ StreamSessionActive

Returns a new instance of StreamSessionActive.

Parameters:

  • options (Hash)

Options Hash (options):

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


263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/aws-sdk-gameliftstreams/waiters.rb', line 263

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 60,
    delay: 2,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_stream_session,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "success",
          "expected" => "ACTIVE"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "ERROR"
        }
      ]
    )
  }.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.



295
296
297
# File 'lib/aws-sdk-gameliftstreams/waiters.rb', line 295

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :identifier (required, String)

    The stream group that runs this stream session.

    This value is an [Amazon Resource Name (ARN)] or ID that uniquely identifies the stream group resource. Example ARN: ‘arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4`. Example ID: `sg-1AB2C3De4`.

    [1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html

  • :stream_session_identifier (required, String)

    An [Amazon Resource Name (ARN)] or ID that uniquely identifies the stream session resource. Example ARN: ‘arn:aws:gameliftstreams:us-west-2:111122223333:streamsession/sg-1AB2C3De4/ABC123def4567`. Example ID: `ABC123def4567`.

    [1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html

Returns:



290
291
292
# File 'lib/aws-sdk-gameliftstreams/waiters.rb', line 290

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