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
Parameters
region InstanceTypeGetParamsRegion
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
}