SDK for PHP 3.x

Waiter
in package
implements PromisorInterface

"Waiters" are associated with an AWS resource (e.g., EC2 instance), and poll that resource and until it is in a particular state.

The Waiter object produces a promise that is either a.) resolved once the waiting conditions are met, or b.) rejected if the waiting conditions cannot be met or has exceeded the number of allowed attempts at meeting the conditions. You can use waiters in a blocking or non-blocking way, depending on whether you call wait() on the promise.

The configuration for the waiter must include information about the operation and the conditions for wait completion.

Table of Contents

Interfaces

PromisorInterface
Interface used with classes that return a promise.

Methods

__construct()  : mixed
The array of configuration options include:
promise()  : Coroutine
Returns a promise.

Methods

__construct()

The array of configuration options include:

public __construct(AwsClientInterface $client, string $name[, array<string|int, mixed> $args = [] ][, array<string|int, mixed> $config = [] ]) : mixed
  • acceptors: (array) Array of acceptor options
  • delay: (int) Number of seconds to delay between attempts
  • maxAttempts: (int) Maximum number of attempts before failing
  • operation: (string) Name of the API operation to use for polling
  • before: (callable) Invoked before attempts. Accepts command and tries.
Parameters
$client : AwsClientInterface

Client used to execute commands.

$name : string

Waiter name.

$args : array<string|int, mixed> = []

Command arguments.

$config : array<string|int, mixed> = []

Waiter config that overrides defaults.

Tags
throws
InvalidArgumentException

if the configuration is incomplete.

On this page