NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Interface WaiterInterface

WaiterInterface used to wait on something to be in a particular state

### Direct known implementers

`Aws\Common\Waiter\AbstractWaiter`, `Aws\Common\Waiter\ResourceWaiterInterface`

### Indirect known implementers

`Aws\Common\InstanceMetadata\Waiter\ServiceAvailable`, `Aws\Common\Waiter\AbstractResourceWaiter`, `Aws\Common\Waiter\CallableWaiter`, `Aws\Common\Waiter\ConfigResourceWaiter`

Namespace: Aws\Common\Waiter
Located at Aws/Common/Waiter/WaiterInterface.php

## Methods summary

- `public` `setMaxAttempts ( int $maxAttempts )`

  Set the maximum number of attempts to make when waiting

- `public` `setInterval ( int $interval )`

  Set the amount of time to interval between attempts

- `public` `setConfig ( array $config )`

  Set configuration options associated with the waiter

- `public` `wait ( )`

  Begin the waiting loop

## Methods detail

# `public `Aws\Common\Waiter\WaiterInterface``
`setMaxAttempts( integer $maxAttempts )`

Set the maximum number of attempts to make when waiting

#### Parameters

$maxAttempts
  `integer`
  $maxAttempts Max number of attempts

#### Returns

``Aws\Common\Waiter\WaiterInterface``
# `public `Aws\Common\Waiter\WaiterInterface``
`setInterval( integer $interval )`

Set the amount of time to interval between attempts

#### Parameters

$interval
  `integer`
  $interval Interval in seconds

#### Returns

``Aws\Common\Waiter\WaiterInterface``
# `public `Aws\Common\Waiter\WaiterInterface``
`setConfig( array $config )`

Set configuration options associated with the waiter

#### Parameters

$config
  `array`
  $config Configuration options to set

#### Returns

``Aws\Common\Waiter\WaiterInterface``
# `public`
`wait( )`

Begin the waiting loop

#### Throw

RuntimeException if the method never resolves to true

### Magic methods summary

## Constants summary

`string` | `INTERVAL` | `'waiter.interval'` | #
`string` | `MAX_ATTEMPTS` | `'waiter.max_attempts'` | #