Spanner/src/Instance.php
public function state(array $options = [])
    {
        $info = $this->info($options);

        return (isset($info['state']))
            ? $info['state']
            : null;
    }
public function state(array $options = [])
    {
        $info = $this->info($options);

        return (isset($info['state']))
            ? $info['state']
            : null;
    }
public function state ( array $ options = [ ] ) { $ info = $ this -> info ( $ options ) ; return ( isset ( $ info [ 'state' ] ) ) ? $ info [ 'state' ] : null ; }
Return the instance state.

When instances are created or updated, they may take some time before
they are ready for use. This method allows for checking whether an
instance is ready.

Example:
```
if ($instance->state() === Instance::STATE_READY) {
echo 'Instance is ready!';
}
```

@param array $options [optional] Configuration options.
@return string|null
Return the instance state .