protected function getAvailableRegions($runtime = false)
    {
        if ($runtime) {
            $regions = [];
            foreach ($this->api()->getClient()->getRegions() as $region) {
                if ($region->available) {
                    $regions[$region->id] = $region->label;
                }
            }
        } else {
            $regions = (array) $this->config()->get('service.available_regions');
        }

        return $regions;
    }
protected function getAvailableRegions($runtime = false)
    {
        if ($runtime) {
            $regions = [];
            foreach ($this->api()->getClient()->getRegions() as $region) {
                if ($region->available) {
                    $regions[$region->id] = $region->label;
                }
            }
        } else {
            $regions = (array) $this->config()->get('service.available_regions');
        }

        return $regions;
    }
protected function getAvailableRegions ( $ runtime = false ) { if ( $ runtime ) { $ regions = [ ] ; foreach ( $ this -> api ( ) -> getClient ( ) -> getRegions ( ) as $ region ) { if ( $ region -> available ) { $ regions [ $ region -> id ] = $ region -> label ; } } } else { $ regions = ( array ) $ this -> config ( ) -> get ( 'service.available_regions' ) ; } return $ regions ; }
Return a list of regions.

The default list is in the config `service.available_regions`. This is
replaced at runtime by an API call.

@param bool $runtime

@return array
Return a list of regions .