Skip to content
DocsOpenAPI spec

    List Quotas

    client.Quotas.List(ctx, query) (*Cursor[Quota], error)
    GET/v1/quotas

    List quota usage and limits for the current organization across all regions

    ParametersExpand Collapse
    query QuotaListParams
    Cursor param.Field[string]Optional

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

    Limit param.Field[int64]Optional

    Maximum number of items to return

    maximum100
    minimum10
    Region param.Field[string]Optional

    Filter by region

    Sort param.Field[string]Optional

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

    ReturnsExpand Collapse
    type Quota struct{…}

    Quota response.

    Compute QuotaCompute

    Compute quota.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64
    Networking QuotaNetworking

    Networking quota.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    NKS quota.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64
    NodePoolMemoryGB QuotaDimensionDetail

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64
    Region RegionName

    Region the resource is in.

    One of the following:
    const RegionNameUsSva2 RegionName = "us-sva-2"
    const RegionNameUsWdc1 RegionName = "us-wdc-1"
    Sandboxes QuotaSandboxes

    Sandbox quota. vcpu and memory_gb count the nodes of the organization’s sandbox clusters in the region.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64
    Storage QuotaStorage

    Storage quota. object_storage is the data stored in the organization’s buckets in the region, in GB (10^9 bytes), rounded up per project. It is measured periodically, so it can trail recent writes by several minutes and can exceed the limit. New buckets cannot be created once used reaches the limit; a limit of 0 means object storage is not available to the organization in the region.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64
    ObjectStorage QuotaDimensionDetail

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    List Quotas

    package main
    
    import (
      "context"
      "fmt"
    
      "github.com/nirvana-labs/nirvana-go"
      "github.com/nirvana-labs/nirvana-go/option"
      "github.com/nirvana-labs/nirvana-go/quotas"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      page, err := client.Quotas.List(context.TODO(), quotas.QuotaListParams{
    
      })
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", page)
    }
    
    {
      "items": [
        {
          "compute": {
            "memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "networking": {
            "public_ips": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vpcs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "nks": {
            "clusters": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "node_pool_memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "node_pool_vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "public_ips": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "region": "us-sva-2",
          "sandboxes": {
            "clusters": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "storage": {
            "abs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "ceph": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "local_nvme": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "object_storage": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          }
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }
    Returns Examples
    {
      "items": [
        {
          "compute": {
            "memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "networking": {
            "public_ips": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vpcs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "nks": {
            "clusters": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "node_pool_memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "node_pool_vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "public_ips": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "region": "us-sva-2",
          "sandboxes": {
            "clusters": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "memory_gb": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "vcpu": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          },
          "storage": {
            "abs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "ceph": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "local_nvme": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "object_storage": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          }
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }