Skip to content
Docs

    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.

    ConnectConnections 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

    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.

    Storage QuotaStorage

    Storage quota.

    Quota dimension detail.

    Limit int64
    Remaining int64
    Used int64

    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": {
            "connect_connections": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "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",
          "storage": {
            "abs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "local_nvme": {
              "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": {
            "connect_connections": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "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",
          "storage": {
            "abs": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            },
            "local_nvme": {
              "limit": 32,
              "remaining": 24,
              "used": 8
            }
          }
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }