---
title: "Go SDK — Catalog & quotas"
description: "Datacenters, capacity, pricing quotes, quotas, and audit search with the Metalhost Go SDK."
url: "https://metalhost.net/docs/developers/guides/sdk-catalog"
---

# Go SDK — Catalog & quotas

`CatalogServiceClient`, `QuotaServiceClient`, and `AuditServiceClient` cover discovery, limits, and compliance history.

## Catalog

```
catalog := catalogv1connect.NewCatalogServiceClient(httpClient, base)
dcs, _ := catalog.ListDatacenters(ctx, connect.NewRequest(
    &catalogv1.ListDatacentersRequest{},
))
cap, _ := catalog.GetVMCapacity(ctx, connect.NewRequest(
    &catalogv1.GetVMCapacityRequest{DatacenterName: "datacenters/us-dal-1"},
))
quote, _ := catalog.QuoteVirtualMachine(ctx, connect.NewRequest(
    &catalogv1.QuoteVirtualMachineRequest{
        Vcpus: 2, RamGib: 8, CpuClass: "cascadelake", BootDiskGib: 80,
        PublicIpv4Count: 1,
    },
))
```

`ListDatacenters` includes per-DC capacity headroom. `GetVMCapacity` returns schedulable vCPU/RAM/GPU for quoting realistic VM sizes.

## Quotas

```
quota := quotav1connect.NewQuotaServiceClient(httpClient, base)
resp, _ := quota.GetMyQuotas(ctx, connect.NewRequest(
    &quotav1.GetMyQuotasRequest{ProjectName: project},
))
for _, q := range resp.Msg.GetQuotas() {
    fmt.Println(q.GetMeter(), q.GetUsed(), "/", q.GetLimit())
}
```

Read-only in v1 — increase requests go through support tickets.

## Audit

```
audit := auditv1connect.NewAuditServiceClient(httpClient, base)
resp, _ := audit.SearchEvents(ctx, connect.NewRequest(
    &auditv1.SearchEventsRequest{
        ProjectName: project,
        ActionPrefix: "compute.vm",
        PageSize: 50,
    },
))
```

## What's next

- [CLI → Catalog & quotas](https://metalhost.net/docs/developers/guides/cli-catalog.md)
- [Go SDK — VMs](https://metalhost.net/docs/developers/guides/sdk-vms.md) — quote before create
