Skip to content
DocsOpenAPI spec

    List Regions

    client.regions.list(RegionListParams { availability, compute_vms, cursor, 7 more } query?, RequestOptionsoptions?): Cursor<Region { availability, compute, name, 3 more } >
    GET/v1/regions

    List all regions

    ParametersExpand Collapse
    query: RegionListParams { availability, compute_vms, cursor, 7 more }
    availability?: "live" | "preview" | "maintenance" | "sunset"

    Filter by region availability

    One of the following:
    "live"
    "preview"
    "maintenance"
    "sunset"
    compute_vms?: boolean

    Only regions where Virtual Machines are available

    cursor?: string

    Pagination cursor returned by a previous request. Only valid for the same filters and sort order.

    limit?: number

    Maximum number of items to return

    maximum100
    minimum10
    networking_vpcs?: boolean

    Only regions where VPCs are available

    nks_autoscaling?: boolean

    Only regions where NKS node pool autoscaling is available

    nks_clusters?: boolean

    Only regions where NKS clusters are available

    sort?: string

    Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: longitude, name, availability

    storage_abs?: boolean

    Only regions where Accelerated Block Storage is available

    storage_local_nvme?: boolean

    Only regions where locally-attached NVMe storage is available

    ReturnsExpand Collapse
    Region { availability, compute, name, 3 more }

    Region response with product availability.

    availability: RegionAvailability

    Availability status of the region.

    One of the following:
    "live"
    "preview"
    "maintenance"
    "sunset"
    compute: Compute { vms }

    Compute products available in this region.

    vms: boolean

    VMs indicates if Virtual Machines are available.

    name: string

    Name of the region.

    networking: Networking { vpcs }

    Networking products available in this region.

    vpcs: boolean

    VPCs indicates if Virtual Private Clouds are available.

    nks: NKS { autoscaling, clusters }

    NKS products available in this region.

    autoscaling: boolean

    Autoscaling indicates if NKS node pool autoscaling is available.

    clusters: boolean

    Clusters indicates if NKS managed Kubernetes clusters are available.

    storage: Storage { abs, local_nvme }

    Storage products available in this region.

    abs: boolean

    ABS indicates if Accelerated Block Storage is available.

    local_nvme: boolean

    LocalNVMe indicates if locally-attached NVMe storage is available.

    List Regions

    import NirvanaLabs from '@nirvana-labs/nirvana';
    
    const client = new NirvanaLabs({
      apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
    });
    
    // Automatically fetches more pages as needed.
    for await (const region of client.regions.list()) {
      console.log(region.availability);
    }
    {
      "items": [
        {
          "availability": "live",
          "compute": {
            "vms": true
          },
          "name": "us-sva-2",
          "networking": {
            "vpcs": true
          },
          "nks": {
            "autoscaling": false,
            "clusters": false
          },
          "storage": {
            "abs": false,
            "local_nvme": true
          }
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }
    Returns Examples
    {
      "items": [
        {
          "availability": "live",
          "compute": {
            "vms": true
          },
          "name": "us-sva-2",
          "networking": {
            "vpcs": true
          },
          "nks": {
            "autoscaling": false,
            "clusters": false
          },
          "storage": {
            "abs": false,
            "local_nvme": true
          }
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }