Get VPC Details
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"),
)
vpc, err := client.Networking.VPCs.Get(context.TODO(), "vpc_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", vpc.ID)
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"firewall_rule_ids": [
"123e4567-e89b-12d3-a456-426614174001",
"123e4567-e89b-12d3-a456-426614174002"
],
"name": "my-vpc",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"subnet": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"cidr": "10.128.35.128/25",
"created_at": "2025-01-01T00:00:00Z",
"name": "my-subnet",
"updated_at": "2025-01-01T00:00:00Z"
},
"tags": [
"production",
"ethereum"
],
"updated_at": "2025-01-01T00:00:00Z"
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"firewall_rule_ids": [
"123e4567-e89b-12d3-a456-426614174001",
"123e4567-e89b-12d3-a456-426614174002"
],
"name": "my-vpc",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"subnet": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"cidr": "10.128.35.128/25",
"created_at": "2025-01-01T00:00:00Z",
"name": "my-subnet",
"updated_at": "2025-01-01T00:00:00Z"
},
"tags": [
"production",
"ethereum"
],
"updated_at": "2025-01-01T00:00:00Z"
}