dwave.cloud.regions.get_regions¶
- get_regions(config: Optional[Union[dwave.cloud.config.models.ClientConfig, str, dict]] = None, *, refresh: bool = False, maxage: Optional[float] = None, no_cache: bool = False) List[dwave.cloud.api.models.Region] [source]¶
Retrieve available Solver API regions.
- Parameters
config – Client configuration used for requests to Metadata API. Given as a
ClientConfig
object, it defines connection parameters in full. Raw config (full or partial) loaded from a file/env withload_config()
can be passed in as adict
and is validated asClientConfig
. A stringconfig
value is interpreted asmetadata_api_endpoint
.refresh – Force regions cache refresh.
maxage – Maximum allowed age, in seconds, of cached regions metadata.
no_cache – Do not use cache.
- Returns
List of
Region
objects, each describing one region.
New in version 0.11.0: Added
get_regions()
.