Skip to content
Docs

Get Instance Type

client.InstanceTypes.Get(ctx, region, name) (*InstanceType, error)
GET/v1/instance_types/{region}/{name}

Get an instance type by region and name

ParametersExpand Collapse
name string
ReturnsExpand Collapse
type InstanceType struct{…}

Instance type.

Chipset string
CreatedAt Time

When the Instance Type was created.

formatdate-time
Family string
MemoryGB int64
Name string
NetworkBandwidthGbps float64

Network bandwidth in Gbps.

Region RegionName

Region the resource is in.

Series string
UpdatedAt Time

When the Instance Type was updated.

formatdate-time
Vcpu int64

Get Instance Type

package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/instance_types"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  instanceType, err := client.InstanceTypes.Get(
    context.TODO(),
    instance_types.InstanceTypeGetParamsRegionUsSva2,
    "n1-standard-8",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", instanceType.NetworkBandwidthGbps)
}
{
  "chipset": "amd-epyc-9354p",
  "created_at": "2025-01-01T00:00:00Z",
  "family": "standard",
  "memory_gb": 32,
  "name": "n1-standard-8",
  "network_bandwidth_gbps": 1,
  "region": "us-sva-2",
  "series": "n1",
  "updated_at": "2025-01-01T00:00:00Z",
  "vcpu": 8
}
Returns Examples
{
  "chipset": "amd-epyc-9354p",
  "created_at": "2025-01-01T00:00:00Z",
  "family": "standard",
  "memory_gb": 32,
  "name": "n1-standard-8",
  "network_bandwidth_gbps": 1,
  "region": "us-sva-2",
  "series": "n1",
  "updated_at": "2025-01-01T00:00:00Z",
  "vcpu": 8
}