Skip to content
Docs

    List Quotas

    client.Quotas.List(ctx) (*QuotaList, error)
    GET/v1/quotas

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

    ReturnsExpand Collapse
    type QuotaList struct{…}
    Items []Quota
    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"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      quotaList, err := client.Quotas.List(context.TODO())
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", quotaList.Items)
    }
    
    {
      "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
      }
    }